Forum: Cfengine Help
Subject: package downgrade doesn't work with yum
Author: Seva Gluschenko
Link to topic: https://cfengine.com/forum/read.php?3,17564,17564#msg-17564

I'm trying to build a promise which allows me to downgrade a package on demand. 
I wrote the following method:


bundle force_package(name, version)
{
 packages:
     centos::
         "$(name)"
                package_method  => yum,
                package_policy     => "reinstall",
                package_version  => "$(version)",
                package_select    => "==",
                comment                => "Enforce package";
}


Unfortunately, that doesn't work as expected because yum reinstall will just 
reinstall the version installed. To make it possible to downgrade a package, 
package_policy "reinstall" must perform yum remove and then yum install using 
the specific version number.

Is there any other method to achieve that? Did I miss something?

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

Reply via email to