Issue #3986 has been updated by Nigel Kersten.

<pre>
class apt::updates {
  exec { blah blah apt-get update }
}

Package { require => Class["apt::updates"], }

}
</pre>

We've taken this a bit further and have an apt_package defined type to do other 
things.

There are lots of reasons apt-get update might fail, there are lots of reasons 
apt-get install foo might fail.

Requiring such an expensive process each time a package fails isn't how I 
expect puppet to work.
----------------------------------------
Bug #3986: apt-get update after failed apt-get install
http://projects.puppetlabs.com/issues/3986

Author: Robert Scheer
Status: Needs more information
Priority: Normal
Assigned to: 
Category: package
Target version: 
Affected version: 0.25.5
Keywords: debian apt apt-get update
Branch: 


Apt, the default package provider for Debian, maintains a local cache of a 
remote package repository. Updating this cache (by executing "apt-get update") 
can and should be an external non-Puppet task, as it is a relatively expensive 
process. It is time-consuming on the Debian client and resource-consuming on 
the package repository server, so this should not happen too often.

However, failing to install a package just because the local package cache is 
out-of-date, I consider to be a bug in Puppet. This is why I propose the 
following fix: if "apt-get install <package>" fails, then first execute 
"apt-get update" and then repeat "apt-get install <package>". This is the same 
one would do when trying to install the package manually.

A patch for the current stable version is attached.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to