Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rpmdev-vercmp to determine correct version of rpms in CentOS5 #34390

Closed
mgresser opened this issue Jun 30, 2016 · 7 comments
Closed

Use rpmdev-vercmp to determine correct version of rpms in CentOS5 #34390

mgresser opened this issue Jun 30, 2016 · 7 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt Execution-Module P4 Priority 4 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@mgresser
Copy link

It appears the fixes from PR 25603 were not included in the 2015.8 and 2016.3 releases.

@mgresser
Copy link
Author

I am seeing this manifested on 2015.8 and 2016.3. If I use salt to install a package, 'foo-1.1-1' it works. If I then use salt to upgrade to a test build, 'foo-1.testbuild-1' that also works. If I then try to revert back to 'foo-1.1-1' it fails. In this case yum and salt appear to disagree as to whether this is an upgrade or downgrade. Salt should be deferring to yum but doesn't appear to.

@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 30, 2016

ping @terminalmage looks like you wanted to be notified of this issue from here #21912

Looks like your latest comment on that issue leads me to believe this will be possible to fix for centos5 using rpmdev-vercmp Not sure if you guys want to move the conversation to this issue. Thanks

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior P4 Priority 4 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Execution-Module Core relates to code central or existential to Salt labels Jun 30, 2016
@Ch3LL Ch3LL added this to the Approved milestone Jun 30, 2016
@terminalmage
Copy link
Contributor

The fixes described in that issue work just fine in 2015.8 and 2016.3.

CentOS 5 was never included in the fix because it doesn't have access the rpm or rpmUtils modules directly due to the fact that Cent5 has a system Python of 2.4.3 while Salt runs on Python 2.6.

@mgresser mgresser changed the title pkg.latest not updating the package on CentOS though yum reports an update available in 2015.8 and 2016.3 Use rpmdev-vercmp to determine correct version of rpms in CentOS5 Jun 30, 2016
@mgresser
Copy link
Author

I'll modify this issue title to be more clear about the issue in light of @terminalmage's feedback.

@terminalmage
Copy link
Contributor

Fixed in #34401.

@terminalmage
Copy link
Contributor

[root@erik-cent5 salt]# chmod -x /usr/bin/rpmdev-vercmp
[root@erik-cent5 salt]# salt-call --local pkg.version_cmp '0.2-001' '0.2.0.1-002'
[WARNING ] rpmdevtools is not installed, please install it for more accurate version comparisons
local:
    1
[root@erik-cent5 salt]# chmod +x /usr/bin/rpmdev-vercmp
[root@erik-cent5 salt]# salt-call --local pkg.version_cmp '0.2-001' '0.2.0.1-002'
local:
    -1

@mgresser
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt Execution-Module P4 Priority 4 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants