help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Software Package Management


From: Paul Paradise
Subject: Re: Software Package Management
Date: Fri, 9 Aug 2002 10:31:35 -0700
User-agent: Mutt/1.3.28i

On Fri, Aug 09, 2002 at 12:23:52PM -0500, John Valdes wrote:
> On Fri, Aug 09, 2002 at 11:06:53AM -0400, Paul Dlug wrote:
> > In the actionsequence I defined my module as "module:pkgchk $(package)"
> > and set the package variable above it. However I obviously need to check
> > multiple packages so I either need a way to rexecute the module with
> > another package or a way to allow the module to define classes like:
> > package.emacs-21 so that I can check them without having to list all
> > possibilities in AddInstallable. Suggestions?
> 
> As Paul indicated, you'll want your module to define classes by
> outputting the list of classes.  Note, btw, that the classes it does
> define shouldn't contain periods or dashes or colons.  You should
> instead use underscores, as in:
> 
> +package_emacs_21
> 
> However, if I'm not mistaken, since these classes get defined at run
> time and not parse time, you'll still need to list these classes in
> AddInstallable, unfortunately.  You'll only need to list those for
> which you've defined other cfengine actions, though, so the list need
> not include every package installed on your system.

Chris Chapin (whom I work with here, and has also posted - consult the
archive) has written a patch (submitted to Mark, I believe) that adds
a modules: top-level directive that parses the modules in time to make
them work without using AddInstallable. We felt it was a bug that
modules didn't appear in time for imports and the like, tweaked the
execution order to allow something like:

modules:
        packages

import:
    package_test::
        package_test.cf
    package_libc6::
        package_libc6.cf

Of course, this still means writing out every package in the import
stanza, but we got around that by writing a script that does
that. (Then we needed to define more classes to guard from importing a
file that doesn't exist - we'd far prefer if cfengine wouldn't
complain and die when attempting to import a nonexistant file) The
better solution would be to have a variable listing each file to
import and iterating over it in the import, but iteration is in many
ways broken for our needs. (For one thing, we'd love to have
backreferencing of variable values in any iteration...)

-- 

----------------------------------------------------------------------
 Paul Paradise                                  paradise@qualcomm.com
 Interim Engineering Intern, QUALCOMM Incorporated       858.651.6655
 IT Host Services                                             AE-205C
----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]