Forum: CFEngine Help Subject: Re: 0000848: upgrade packages to latest available version with yum Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,23809,23828#msg-23828
svenXY Wrote: ------------------------------------------------------- > Hi, > > toddnni Wrote: > -------------------------------------------------- > > If you want to rely on your repository, then I > > think that you could also rely on your package > > manager and use a (non convergent) command promise > > to call the package manager directly to update all > > installed packages. > > Sure, I could do this with a command easily. But then I split my package > promises between packages: > and commands: and I'd need two different approaches for doing nearly the > same. Also I could > not make use of the package cache that cfengine builds up and would have to > upgrade the operating > system's cache too often. Many reasons to ask for an implementation within > packages. Agree? To my understanding cfengine builds up its cache using package manager's cache (= operating system's cache) and it will be updated as often as cfengine's cache. > Also - cfengine - in the end - relies on the repo as well, with the small > difference that you > specify a version. But if you use a version and ">", you'd also not know what > you end up with - it > will install whatever the repository offers. Where is the difference? I think this depends on the package manager (and package_method). I haven't tried yum, but for example FreeBSD's simple package manager installs specific version of the package, and in this case the nothing breaks up even if the repository's latest packages change accidentally. > > (Or maybe you could configure > > your package_method to always try to update every > > package). > > That might be a way to do this. But to me it is > misusing the command for something else - not very > clean and intuitive, but that's only my 2 cents. > > > Maybe cfengine could be modified somehow to fetch > > the latest version from the repository, but > > currently I don't see this useful enough. > > Yes, that is exactly what I'm after here. We have > repositories "dedicated" to different stages of > our continuous integration setup and guarantee > that the latest version available in a certain > repo is the one I want installed on all boxes > there. No reason to also specify version numbers > in promise bundles. Useful? > > Cheers, > Sven Yes, I see this useful in your case. However simple package_policy=>"add" promises and a periodic update command does the same thing (I argue that "the new implementation" would end up doing the same thing but internally). Thanks for the discussion. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine