Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
chef 12 ignores default_release for apt_package #2606
I just figured out an issue after upgrading to chef 12. When specifying a
apt_package "haveged" do default_release "wheezy-backports" end
I would expect that chef installs
I'm able to reproduce this issue on two clean VMs, installed only Chef 11.16.4 on the first one and 12.0.1 on the second. After executing the example recipe below I get haveged 1.9.1-1~bpo70+1 on the first VM and 1.4-4 on the second. The only difference between these two machines is the chef version.
Full example recipe to reproduce the issue:
file "/etc/apt/sources.list" do content <<-EOF deb http://ftp.de.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb http://ftp.de.debian.org/debian/ wheezy-updates main deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free EOF notifies :run, "execute[apt-get update]", :immediately end execute "apt-get update" do command "apt-get update" action :nothing end apt_package "haveged" do default_release "wheezy-backports" end
Before this debug output, chef executes
As you can see in the output above there is a difference in the pin priority of the backports package. It looks like that Chef 12 doesn't forward the default-release option to apt. The following snippet is part of the apt-get manpage:
Let me know if I can provide any further information.
Okay I suspect this is at fault:
I think this is really a
I also ran in this problem.