[Top][All Lists]

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

Patch to add install action to packages:

From: Phil D'Amore
Subject: Patch to add install action to packages:
Date: Fri, 25 Feb 2005 10:06:01 -0500


Attached is a patch to 2.1.13 that will add an action= argument to
packages: items.  I submitted this a while back and nobody bit, but
there seemed to be interest in it afterward so I'm re-posting.  Sorry
for taking so long to re-post :(...

This patch is complete with docs additions to describe it, along with
some other small (mostly formatting) cleanups of the packages:

In short, this adds the ability to do something like this:

        actionsequence = ( packages )
        DefaultPkgMgr = ( rpm )
        RPMInstallCommand = ( /usr/sbin/up2date %s )

        foo     action=install
        bar     action=install
        baz     action=install

Any of the packages that are not installed will be grouped together and
installed after the package checks complete.  That is, after checking
for foo, bar, and baz, if for example foo and baz are found to not be
installed, then the following would be run:

/usr/sbin/up2date foo baz

Should be simple enough.  The next logical extension to this would be an
action=remove, and indeed I have placed skeleton code in to process
that, so action=remove will be accepted, but the operation is not
implemented at this time, mainly because I don't know how to deal with
package dependencies, or if I should even worry about them.

I used RPM as an example here, but all three supported package managers
*should* work.  You can actually use more than one package manager at
once, since each keeps its own to-be-installed list.  If folks could
test the Debian and Sun parts of this, it'd be greatly appreciated, as I
don't really have the facilities to do so ;).  Most of the code for this
is package manager agnostic, except for the part that decides which
variable to read for the install command (RPMInstallCommand,
DPKGInstallCommand, SUNInstallCommand), so I'm expecting it will Just
Work (tm).

Let me know if I can make this more useful...

Phil D'Amore                             "Sometimes there is a fine line
Senior System Administrator               between criminally abusive
Red Hat, Inc                              behavior and fun."
Office: 919.754.3700 x44395                 -- Ted the Generic Guy
Pager: 877.383.8795                            (Dilbert 4/19/2003)

Attachment: cfengine-2.1.13-packageinstall-multi.patch
Description: Text Data

reply via email to

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