Forum: Cfengine Help
Subject: Re: Cfengine Help: Re: Advice on using package promises
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,22694,22697#msg-22697

Bas,

Thanks for the feedback.

I was hoping, in the general case (there may be occasions where I'll need to be 
more explicit), to write promises in terms of simply the application version 
(1.2.7), as opposed to the long format you've proposed, which is the 
concatenation of the application version and the release of the package itself:

# /bin/rpm -qa --qf '%{name} %{epoch} %{version} %{release} %{arch}\n' apr
apr (none) 1.2.7 11.el5_6.5 x86_64
apr (none) 1.2.7 11.el5_6.5 i386


The yum manpage indicates "name-version" is a valid format:

       Specifying package names
              A package can be referred to for install,update,list,remove etc 
with any of the following:

              name
              name.arch
              name-ver
              name-ver-rel
              name-ver-rel.arch
              name-epoch:ver-rel.arch
              epoch:name-ver-rel.arch

              For example: yum remove kernel-2.4.1-10.i686


It's my hope that the ultimate resolution to Cfengine package version 
comparison problems for RPM supports all three valid means of grouping 
version-related information:

ver
ver-rel
epoch:ver-rel

That is, if I craft a "package_version_regex" that results in any of the above 
formats, Cfengine should be able to make the correct string comparison.

-Jessica

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to