Zypper and yum seem to check and update the latest list of packages every time it runs before installing any selected packages.
Could we do something like this for Debian/Ubuntu? package_add_command => "/usr/bin/aptitude update && /usr/bin/aptitude --assume-yes install"; Cheers, --Nakarin On Jan 26, 2010, at 3:25 PM, Mark Burgess wrote: > > This seems reasonable. I am spoiled using zypper which does this > automatically. > > Jonathan Clarke wrote: >> On 25/01/2010 14:44, Jonathan Clarke wrote: >>> Hi, >>> >>> I've been testing the standard library, in particular the apt >>> package_method. I come with a bug and some suggestions. >> >> One further question: >> >> To "be aware" of new package, aptitude (or apt-get) must download the >> latest list of packages from all repositories. This is done via the >> command "aptitude update". >> >> Currently, cfengine does not do this, nor does it seem to provide a >> field to fill in a package_method for this. Is this deliberate, or just >> missing? >> >> I realize this could be done separately in a commands section, that then >> defines a class on success, and causes a packages promise to be executed >> on the next iteration through promises... but that feel ugly, and does >> not succeed at "hiding" the package system's details. >> >> Should we add a package_list_update_command, that would be executed once >> on each execution (at most) before any packages promises are run (if not >> empty)? >> >> For discussion, I'm considering this simple example: >> >> 8<-- >> packages: >> >> "apache2" >> >> package_policy => "update", >> package_method => apt, >> comment => "This promise keeps apache2 as up to date as possible"; >> 8<-- >> >> Jonathan > > -- > Mark Burgess > > ------------------------------------------------- > Professor of Network and System Administration > Oslo University College, Norway > > Personal Web: http://www.iu.hio.no/~mark > Office Telf : +47 22453272 > ------------------------------------------------- > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine