Forum: CFEngine Help
Subject: yum_rpm automatic package upgrades
Author: svenXY
Link to topic: https://cfengine.com/forum/read.php?3,22812,22812#msg-22812

Hi again,

I'm still struggeling with this.

This time, I'd like to find a solution to always upgrade a package if there is 
a new one available without having to specify specific versions.

Something along the lines of


  "${upd_packages}"
      handle         => "upgrade_package",
      comments       => "upgrade RPM package to latest available",
      package_policy => "update",
      package_method => yum_upgrade;  # and how would yum_upgrade then look 
like?   


I guess my main problem is that I still do not understand how cfengine makes 
its decisions if and when an upgrade is actually necessary. Is this documented 
somewhere? It would help me come up with solutions myself.

To my understanding, cfengine 

1) creates a list of installed packages
2) compares this with package_version and the like
3) based on that makes a decision if updating is required
4) runs package_update_command

If that is correct, then my problem is 3), because I do not specify a version 
here. I'm looking for something where I do not have to always increment the 
version that is compared.

For example:


# yum list nagios-plugins
Reading repository metadata in from local files
Installed Packages
nagios-plugins.noarch              0.6-1666               installed       
Available Packages
nagios-plugins.noarch              0.6-1721               pkg-extras 


Whatever I tried, it would only ever install 1721 if I add a package_version 
with explicitely  0.6-1721 or greater than 0.6-1666. 

I was not able to find something that would automatically install/upgrade to 
the lastest package available. In fact, even when specifying >= 0.6-1666, it 
would not try anything and in all the verbose output, I never saw 0.6-1721 even 
mentioned.

Any hints here are greatly appreciated.

Thanks & cheers,
Sven

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

Reply via email to