Issue #17745 has been reported by Pierre Larsson.

----------------------------------------
Bug #17745: Comparing package versions in puppet behaves differently to yum
https://projects.puppetlabs.com/issues/17745

Author: Pierre Larsson
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.7.19
Keywords: 
Branch: 


I'm trying to make use of the yum downgrade functionality which is described in 
Issue #2866.

Our build process creates packages with a typical rpm version say:

foo-2.2-405.noarch.rpm which compared with package foo-2.2-406.noarch.rpm works 
perfectly fine

But If I build a local version of my package there is no build number and the 
package is named for ex:

foo-2.2-SNAPSHOT20121119105647.noarch.rpm which compared with 
foo-2.2-405.noarch.rpm in puppet returns as a higher version.

With foo-2.2-405.noarch.rpm installed I can do yum downgrade 
foo-2.2-SNAPSHOT20121119105647 but the same thing in a puppet manifest fails at 
this stage in puppet/provider/package/yum.rb:

<pre>if is && Puppet::Util::Package.versioncmp(should, is[:ensure]) < 0</pre>

Which leads me to:
puppet/util/package.rb where the version compare is happening. Can this be 
updated to compare the versions in the same way yum does?

For completeness I want the puppet manifests to be the same in all 
environments, from LOCAL->DEV->QA->PROD and not have to add any extra exec's to 
uninstall packages.

Thanks,
Pierre


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to