help-cfengine
[Top][All Lists]
Advanced

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

Re: method to check for package installation


From: Christian Pearce
Subject: Re: method to check for package installation
Date: Wed, 28 Apr 2004 10:12:38 -0400

Valid points.  I have had this code written years before packages
section even exists.  So for me I don't want to rewrite the code.

I often go back and forth over the whole packaging thing.  RPM are
better, but I maintain there isn't anything you can do with the RPMs
that can't be done with System V packages.  People just don't leverage
the features as much.  They tend to create silo pacakges.  Where Linux
and Red Hat pushed the concepts of packaging and extensible used it.

Having said that there is a lot of work to do this.  I think the
community support for good third packages packages is lacking compared
to that of the RPM based community.  And this adds to the perceived lack
of quality in  System V when it comes to packages.

I took a look at OpenPKG which makes use of RPM on multiple platforms. 
The issue there is you need to re-implement a lot of the environment
that exists natively or order to benefit from the multiple platform
packaging.  So you effectively are adding another OS/distribution to
your environment. Albeit it is a consistent one.

Plus at the end of the day people like what is native.  and I couldn't
agree more.  Since we have products that uses cfengine have to think
extra special hard about how we standardize the environment. It is a
challenge.

If it was just me I would prob just use OpenPKG or pick one vendor and
stick with it as much as possible.  Depending on your needs that might
not be possible.  (ie. the windows factor)

This might not have been the best conversation for the list, but it is
very debatable.  So let's leave with something cfengine related.

Question:

Is anyone working on or interested in using System V packages in
cfengine in the packages section?

On Wed, 2004-04-28 at 09:59, Chip Seraphine wrote:
> Consistency is good, but so is not spending too much effort on code you 
> intend 
> to junk in the forseeable future.
> 
> I gave up on thinking too hard about that same problem because RPM and Sol 
> pkg 
> are just fundamentally different animals.  RPM is a lot better than Sol is at 
> relocation, noninteractive installs, transparent upgrades, diagnostics, etc, 
> and I was sort of crippling myself by trying to treat them as 
> interchangeable.  (ObligEcumenicalRemark: Sol pkgs have their advantages 
> too!)
> 
> Anyway, I wrote a module in Perl to handle the package updates (it reads a 
> list of desired packages and versions from files based on the defined 
> classes) and now use packages: (plus a smaller perl script) to handle the 
> RPMs.  When The Time Comes, I will happily junk the Sol pkg module and write 
> another packages: section, but I figured there is no reason to spend time 
> having my package-module support RPM when that is a dead end.
> 
> 
> 
> On Wednesday 28 April 2004 08:06, Christian Pearce wrote:
> > Chip,
> > 
> > Yea I saw you guys were having issues with it.  I am currently using
> > 2.1.4.  I would like to move to packaging.  I want it to support Solaris
> > first.  I don't know if I will personally get a chance to write any of
> > that.  Have there been requests in the past?   The reason I still with
> > this way of doing it is for consistency.
> > 
> > On Wed, 2004-04-28 at 09:01, Chip Seraphine wrote:
> > > Be careful if you are using the latest versions.... ReturnsZero() has not 
> been 
> > > working lately for me (and some others on the list).
> > > 
> > > 
> > > On Wednesday 28 April 2004 07:17, Christian Pearce wrote:
> > > > Graham,
> > > > 
> > > > I have been doing this for years.
> > > > 
> > > > control:
> > > >  
> > > >     logwatch_rev     = ( "5.1-1" )
> > > >     logwatch_package = ( "logwatch-$(logwatch_rev).noarch.rpm" )
> > > > 
> > > > groups:
> > > >     # Test to see if logwatch is installed.
> > > >     logwatch_installed = ( ReturnsZero(${rpm} -q --quiet logwatch) )
> > > >  
> > > >     # Test to see if logwatch is upgraded to the latest version.
> > > >     logwatch_upgraded = ( ReturnsZero(${rpm} -q --quiet
> > > > logwatch-${logwatch_rev}) )
> > > >  
> > > > 
> > > > 
> > > > On Tue, 2004-04-27 at 20:38, Graham Allan wrote:
> > > > > I'm trying to write a method file to check if a particular RPM package
> > > > > is installed, and if not, install it.
> > > > > 
> > > > > So far I've completely failed to make cfengine check whether a package
> > > > > is installed, when the package name is held in a variable.
> > > > > 
> > > > > Attempts 1 and 2 were to define a class.
> > > > > 
> > > > > classes:
> > > > >   package_installed = ( '/bin/rpm -q ${packagename}' )
> > > > > 
> > > > > and...
> > > > > 
> > > > > classes:
> > > > >   package_installed = ( ReturnsZero(/bin/rpm -q ${packagename}) )
> > > > > 
> > > > > Attempt 3 was use use the "packages" action.
> > > > > 
> > > > > packages:
> > > > >   any::
> > > > >       $(packagename) pkgmgr=rpm define=package_installed
> > > > > 
> > > > > 
> > > > > In every case, the cfengine output shows that rpm is being called to
> > > > > check for a literal "${packagename}" package - the variable is not
> > > > > getting substituted. The same commands work fine when they contain the
> > > > > literal package name.
> > > > > 
> > > > > Is there any way I've missed that might make this work?
> > > > > 
> > > > > G.
> > > > -- 
> > > > Christian Pearce
> > > > http://www.commnav.com
> > > > http://www.perfectorder.com
> > > > 
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Help-cfengine mailing list
> > > > address@hidden
> > > > http://mail.gnu.org/mailman/listinfo/help-cfengine
> > > > 
> > -- 
> > Christian Pearce
> > http://www.commnav.com
> > http://www.perfectorder.com
> > 
> > 
-- 
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com






reply via email to

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