THanks very much Eric. I would certainly like to include this, once I
have looked over the code briefly. The svn server is very flakey and
the database needs to be recovered at regular intervals...sigh. It
should be working again now.

Eric Searcy wrote:
> Hello,
> 
> I've written a patch (attached) for cfengine that adds support to the
> `packages:' action for the Gentoo Linux [1] Portage [2] package
> management system.  I have been using cfengine 2.1.20 with this patch
> for the last several months on a network of several dozen production
> hosts.  The same unified diff also correctly applies to the 2.2.21
> release. (I would test against the latest SVN revision, but I can't seem
> to connect at the moment, and neither can viewcvs on the site.  It is
> probably broken by the recently-added AIX support.)  I based it very
> closely off the RPMPackageCheck code, and it reuses the rpmvercmp function.
> 
> To use, the DefaultPkgMgr/pkgmgr should be given the value `portage',
> and the function expects (and checks for) the macro
> PortageInstallCommand, which should be set to ``/usr/bin/emerge
> --nocolor'' or similar.  Setting cmp and version, as well as setting
> neither (existence check only) is supported.
> 
> Please comment on whether this patch could be incorporated into the
> trunk.  If you would like any clarifications on the design of the
> PortagePackageCheck function or any other changes I made, please ask. 
> One quick note is that it makes an exec call to a python one-liner to
> grab package information.  Portage is a python-based system with a
> python API, and since python is required by portage, there shouldn't be
> any dependancy concerns.
> 
> [1] http://www.gentoo.org/
> [2] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
> 
> --Eric Searcy
> OSU Open Source Lab
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

Professor of Network and System Administration
Oslo University College

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  [EMAIL PROTECTED]
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to