Bug 595135

Summary: RFE: include rpmdev-sort
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rpmdevtools-7.10-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-05 13:23:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
rpmdev-sort
none
rpmdev-sort none

Description Dan Horák 2010-05-23 15:04:07 UTC
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 18:17:36 UTC
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 13:29:52 UTC
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 20:26:26 UTC
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 18:15:23 UTC
Added in 7.10, with some minor improvements.

Comment 5 Fedora Update System 2010-09-27 18:40:50 UTC
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 18:47:02 UTC
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 20:06:39 UTC
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 13:23:30 UTC
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 20:44:21 UTC
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.