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,26709#msg-26709

Yeah but I think there is also a problem with the package name itself with the 
yum package_method.


Consider this from verbose runs.

Using the yum package_method, you can see its trying to install the package 
"vim-enhanced.*" (the regex is included in the package name its trying to 
install.

cf3> Checking if package (vim-enhanced,*,*) is at the desired state 
(installed=0,matched=0)
cf3>  -> Package promises to refer to itself as "vim-enhanced.*" 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>  -> Schedule package for addition
cf3>  -> Package (vim-enhanced.*,any,any) found
cf3>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cf3>    Offering these package-promise suggestions to the managers
cf3>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cf3>  -> Deletion schedule...
cf3>  -> Addition schedule...
cf3> Execute scheduled package addition
cf3> Command prefix: /usr/bin/yum -y install
cf3> Executing /usr/bin/yum -y install vim-enhanced.* ...


Now yum_rpm
You can see the package name is "vim-enhanced"

cf3> Checking if package (vim-enhanced,*,*) is at the desired state 
(installed=1,matched=1)
cf3>  -> Package promises to refer to itself as "vim-enhanced" to the manager
cf3>  -> Package version seems to match criteria
cf3>  -> Package "vim-enhanced" already installed, so we never add it again


So the yum package_method is looking for the wrong package name to begin with, 
yum just goes ahead and installs the matching package the first time, probably 
thats incorrect since the package vim-enhanced.* doesnt exist. And it says its 
repaired because yum returns 0 when it trys to install a package that doesn't 
exist.

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

Reply via email to