Forum: CFEngine Help
Subject: Re: CFEngine Help: How-to restart machine after certain package have
been installed.
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26673,26713#msg-26713
Humm, so I am looking at the package_installed_regex now.
package_installed_regex => ".*(installed|\s+@).*";
Check out yum-list-installed output from an el6 box.
ustr.x86_64 1.0.4-9.1.el6 @anaconda-CentOS-201106060106.x86_64/6.0
util-linux-ng.x86_64 2.17.2-6.el6 @anaconda-CentOS-201106060106.x86_64/6.0
vim-common.x86_64 2:7.2.411-1.8.el6
@base
vim-enhanced.x86_64 2:7.2.411-1.8.el6
@base
Some of the output appears to be multi-line. I think this is why I'm seeing
what I am seeing with that specific package.
Because if I switch to a package that has single line output like ustr or
util-linux-ng, then its detected as installed.
cf3> -> Package version was not specified
cf3> -> Looking for (ustr,*,*)
cf3> -> Matched name ustr
cf3> -> Matched version *
cf3> -> Looking for (ustr,*,*)
cf3> -> Matched name ustr
cf3> -> Matched version *
cf3> Checking if package (ustr,*,*) is at the desired state
(installed=1,matched=1)
cf3> -> Package promises to refer to itself as "ustr.*" to the manager
cf3> !! Package name contians '*' -- perhaps a missing attribute
(name/version/arch) should be specified
cf3> -> Package version seems to match criteria
cf3> -> Package "ustr" already installed, so we never add it again
So, to fix package_method yum I think something will have to be done about the
package_installed_regex.
Does anyone else consider this a bug? I usually use yum_rpm but yum seems to be
used by lots of people when they get started. Would it worth be considering
just duplicating yum_rpm to yum, or is there some deficiency of yum_rpm that I
have not stumbled on just yet.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine