diff options
author | intrigeri <intrigeri@boum.org> | 2010-12-14 22:04:05 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-12-14 22:04:05 +0100 |
commit | 4979889584b2b150e43f9930f5eccbf6cf5245fa (patch) | |
tree | 613807069690f2dfc52fa5c4999a31e900ddb5c5 /manifests | |
parent | 1ae3fdfeb5308ed3abe8a2ad73820fcb10bab531 (diff) |
(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.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/upgrade_package.pp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/manifests/upgrade_package.pp b/manifests/upgrade_package.pp index ecdd74f..7656a9b 100644 --- a/manifests/upgrade_package.pp +++ b/manifests/upgrade_package.pp @@ -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" ], } } |