Problem with apt-cache policy


#1

Hi,

I’m working on a chef Ruby Enterprise Cookbook that uses Brightbox apt
repository in case that the machine that is going to be installed is ubuntu
8.04. The recipe goes like this:

First I add brightbox sources.list file and perform apt-get update
Then I declare the package libruby-1.8 with the following lines:

package “libruby-1.8” do
action :install
action :upgrade
end

But chef is not working as I expected and it stays on not installing ruby.

In the log there’s the following information:

[Tue, 08 Dec 2009 21:21:19 -0500] INFO: Ran execute[apt-get update]
successfully
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Processing package[libruby-1.8]
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: package[libruby-1.8] using
Chef::Provider::package::Apt
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Checking apt-cache policy for
libruby-1.8
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Saving the current state of node
ubuntu_localdomain
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Sending HTTP Request via PUT to
/nodes/ubuntu_localdomain

Also apt-cache policy libruby1.8 shows:

libruby1.8:
Installed: 1.8.6.111-2ubuntu1.3
Candidate: 1.8.6.20090610-0bbox1
Version table:
1.8.6.20090610-0bbox1 0
500 http://apt.brightbox.net hardy/rubyee Packages
*** 1.8.6.111-2ubuntu1.3 0
500 http://us.archive.ubuntu.com hardy-updates/main Packages
500 http://security.ubuntu.com hardy-security/main Packages
100 /var/lib/dpkg/status
1.8.6.111-2ubuntu1 0
500 http://us.archive.ubuntu.com hardy/main Packages

What am I missing?

Thanks.

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a


#2

What happens if you just do action :upgrade?

Adam

On Tue, Dec 8, 2009 at 6:39 PM, Jacobo García jacobo.garcia@gmail.com wrote:

Hi,
I’m working on a chef Ruby Enterprise Cookbook that uses Brightbox apt
repository in case that the machine that is going to be installed is ubuntu
8.04. The recipe goes like this:
First I add brightbox sources.list file and perform apt-get update
Then I declare the package libruby-1.8 with the following lines:
package “libruby-1.8” do
action :install
action :upgrade
end
But chef is not working as I expected and it stays on not installing ruby.
In the log there’s the following information:
[Tue, 08 Dec 2009 21:21:19 -0500] INFO: Ran execute[apt-get update]
successfully
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Processing package[libruby-1.8]
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: package[libruby-1.8] using
Chef::Provider::package::Apt
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Checking apt-cache policy for
libruby-1.8
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Saving the current state of node
ubuntu_localdomain
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Sending HTTP Request via PUT to
/nodes/ubuntu_localdomain
Also apt-cache policy libruby1.8 shows:
libruby1.8:
Installed: 1.8.6.111-2ubuntu1.3
Candidate: 1.8.6.20090610-0bbox1
Version table:
1.8.6.20090610-0bbox1 0
500 http://apt.brightbox.net hardy/rubyee Packages
*** 1.8.6.111-2ubuntu1.3 0
500 http://us.archive.ubuntu.com hardy-updates/main Packages
500 http://security.ubuntu.com hardy-security/main Packages
100 /var/lib/dpkg/status
1.8.6.111-2ubuntu1 0
500 http://us.archive.ubuntu.com hardy/main Packages
What am I missing?
Thanks.
Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


#3

The packge does not install just upgrading it, this is the log output.

DEBUG: Processing package[libruby-1.8]
DEBUG: package[libruby-1.8] using Chef::Provider::package::Apt
DEBUG: Checking apt-cache policy for libruby-1.8
DEBUG: Processing package[libxslt1-dev]
DEBUG: package[libxslt1-dev] using Chef::Provider::package::Apt
DEBUG: Checking apt-cache policy for libxslt1-dev
DEBUG: Current version is nil

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

On Fri, Dec 11, 2009 at 8:08 PM, Adam Jacob adam@opscode.com wrote:

What happens if you just do action :upgrade?

Adam

On Tue, Dec 8, 2009 at 6:39 PM, Jacobo García jacobo.garcia@gmail.com
wrote:

Hi,
I’m working on a chef Ruby Enterprise Cookbook that uses Brightbox apt
repository in case that the machine that is going to be installed is
ubuntu
8.04. The recipe goes like this:
First I add brightbox sources.list file and perform apt-get update
Then I declare the package libruby-1.8 with the following lines:
package “libruby-1.8” do
action :install
action :upgrade
end
But chef is not working as I expected and it stays on not installing
ruby.
In the log there’s the following information:
[Tue, 08 Dec 2009 21:21:19 -0500] INFO: Ran execute[apt-get update]
successfully
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Processing package[libruby-1.8]
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: package[libruby-1.8] using
Chef::Provider::package::Apt
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Checking apt-cache policy for
libruby-1.8
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Saving the current state of node
ubuntu_localdomain
[Tue, 08 Dec 2009 21:21:19 -0500] DEBUG: Sending HTTP Request via PUT to
/nodes/ubuntu_localdomain
Also apt-cache policy libruby1.8 shows:
libruby1.8:
Installed: 1.8.6.111-2ubuntu1.3
Candidate: 1.8.6.20090610-0bbox1
Version table:
1.8.6.20090610-0bbox1 0
500 http://apt.brightbox.net hardy/rubyee Packages
*** 1.8.6.111-2ubuntu1.3 0
500 http://us.archive.ubuntu.com hardy-updates/main Packages
500 http://security.ubuntu.com hardy-security/main Packages
100 /var/lib/dpkg/status
1.8.6.111-2ubuntu1 0
500 http://us.archive.ubuntu.com hardy/main Packages
What am I missing?
Thanks.
Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


#4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jacobo García wrote:

The packge does not install just upgrading it, this is the log output.

DEBUG: Processing package[libruby-1.8]
DEBUG: package[libruby-1.8] using Chef::Provider::package::Apt
DEBUG: Checking apt-cache policy for libruby-1.8
DEBUG: Processing package[libxslt1-dev]
DEBUG: package[libxslt1-dev] using Chef::Provider::package::Apt
DEBUG: Checking apt-cache policy for libxslt1-dev
DEBUG: Current version is nil

Hrm - that’s very odd, Jacobo. If there is a new package available, we
should definitely be installing it. Do you have anything setting
package pinning?

Adam


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLJombAAoJEK+ksDjf4JoCnlkH/3VPL+hRpO7tcRyxoLsMsZKk
P55bMWyN5z4UPLktCQ3C+loP7QbtXODm/yOQl8n4lYbD6Pr6zd6aGtmhyto41d9u
lBzqMmYaRfomOpbLNQUzy1eI7vNBF2qKdTcmbuE44msfvu+EcFl2crcTIo1MiDpL
SzbDINlkq+6FYyMINArV5jF0ONaxWNbjDuAXqVuQ3ssuEHCftQr3US5uY0GpneW3
MYQJB8dHQfTyExBuP1i+/u+Nu/tDR8IZ8JbT4Syj1+K9/nLTPtw4r6CWilPR7ZmV
xpCkna/k3gPcMwrrhm12CJvmsAT6+SG1yTK1BY8IG5OpYBNFhRMsBmiDzi8NL5o=
=coPS
-----END PGP SIGNATURE-----