(ugly workaround warning) Update packages lists before upgrading a package.

... because Exec[update_apt] is currently never run since we set it refreshonly.
Better solutions are being thought of, but in the meantime the least we can do
is somehow repair apt::upgrade_package.
This commit is contained in:
intrigeri 2010-12-14 22:04:05 +01:00
parent 1ae3fdfeb5
commit 4979889584

View file

@ -2,12 +2,12 @@ define apt::upgrade_package ($version = "") {
case $version {
'', 'latest': {
exec { "aptitude -y install $name":
exec { "/usr/bin/apt-get update && aptitude -y install $name":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
}
}
default: {
exec { "aptitude -y install $name=$version":
exec { "/usr/bin/apt-get update && aptitude -y install $name=$version":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
}
}