Bug 595135 - RFE: include rpmdev-sort
RFE: include rpmdev-sort
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-23 11:04 EDT by Dan Horák
Modified: 2010-10-08 16:44 EDT (History)
1 user (show)

See Also:
Fixed In Version: rpmdevtools-7.10-1.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-05 09:23:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rpmdev-sort (1.64 KB, application/octet-stream)
2010-05-23 11:04 EDT, Dan Horák
no flags Details
rpmdev-sort (1.56 KB, application/octet-stream)
2010-05-28 09:29 EDT, Dan Horák
no flags Details

  None (edit)
Description Dan Horák 2010-05-23 11:04:07 EDT
Created attachment 415965 [details]
rpmdev-sort

I had to find next to last package build in the output of "koji latest-tagged" so I wrote the rpmdev-sort tool.
Comment 1 Ville Skyttä 2010-05-24 14:17:36 EDT
Two minor issues:

This would introduce a "hard" dependency on yum, see for example how rpmdev-vercmp works around it.

I believe the lines.sort(rpm_compare) way wouldn't work with Python 3.x, it'd be nice to do it in a way that works with both 2.x and 3.x.
Comment 2 Dan Horák 2010-05-28 09:29:52 EDT
Created attachment 417605 [details]
rpmdev-sort

The dependency on yum is dropped completely, there was even a bug, because it worked with V-R instead of N-V-R.

I am not an experienced python programmer, but I think it's not possible to easily solve the sorting in Python3 as rpm itself uses a specific sorting/compare function for the version/release parts.
Comment 3 Ville Skyttä 2010-07-28 16:26:26 EDT
What do you think, should this handle Epochs as well?  I'm not sure if there's a too standard way of including it in package strings, but here are a few examples:

$ yum list installed
[...]
kdeutils.x86_64                      6:4.4.5-1.fc13             @updates        
[...]

$ yum install kdeutils
[...]
  Installing     : 6:kdeutils-4.4.5-1.fc13.x86_64               1/1
[...]
Comment 4 Ville Skyttä 2010-09-27 14:15:23 EDT
Added in 7.10, with some minor improvements.
Comment 5 Fedora Update System 2010-09-27 14:40:50 EDT
rpmdevtools-7.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/rpmdevtools-7.10-1.fc14
Comment 6 Fedora Update System 2010-09-27 14:47:02 EDT
rpmdevtools-7.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/rpmdevtools-7.10-1.fc13
Comment 7 Fedora Update System 2010-09-27 16:06:39 EDT
rpmdevtools-7.10-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpmdevtools'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rpmdevtools-7.10-1.fc14
Comment 8 Fedora Update System 2010-10-05 09:23:30 EDT
rpmdevtools-7.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2010-10-08 16:44:21 EDT
rpmdevtools-7.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.