help-cfengine
[Top][All Lists]
Advanced

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

Playing with packages w/patch


From: Armin Wolfermann
Subject: Playing with packages w/patch
Date: Fri, 5 Sep 2003 16:10:41 +0159
User-agent: Mutt/1.5.4i

Hi,

I decided to try the new packages feature today and found it very
promising. To make it work on my Solaris box, I had to apply the
following patch (%% for snprintf, and quotes for OpenPKG's rpm):

--- package.c.save      Fri Sep  5 15:51:11 2003
+++ package.c   Fri Sep  5 15:51:22 2003
@@ -75,7 +75,7 @@
   enum cmpsense result;
   int match = 0;
 
-snprintf(VBUFF,bufsize,"/bin/rpm -q --queryformat 
%{EPOCH}:%{VERSION}-%{RELEASE}\\n %s", package);
+snprintf(VBUFF,bufsize,"/bin/rpm -q --queryformat 
'%%{EPOCH}:%%{VERSION}-%%{RELEASE}\\n' %s", package);
 
 if ((pp = cfpopen(VBUFF, "r")) == NULL)
   {

I would also suggest to make the path to rpm configurable, as it's not
always under /bin (OpenPKG uses it's own hierarchy). Something like

DefaultPkgMgrPath = ( /pkg/bin/rpm )

maybe?

Regards,
Armin Wolfermann




reply via email to

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