]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
(ugly workaround warning) Update packages lists before upgrading a package.
authorintrigeri <intrigeri@boum.org>
Tue, 14 Dec 2010 21:04:05 +0000 (22:04 +0100)
committerintrigeri <intrigeri@boum.org>
Tue, 14 Dec 2010 21:04:05 +0000 (22:04 +0100)
... 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.

manifests/upgrade_package.pp

index ecdd74ff095941d689b31b6c744cb88495c0d50d..7656a9b477ea273ca2640594b19166be4dae35e9 100644 (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" ],
       }
     }