Created attachment 415965 [details]
I had to find next to last package build in the output of "koji latest-tagged" so I wrote the rpmdev-sort tool.
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.
Created attachment 417605 [details]
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.
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
Added in 7.10, with some minor improvements.
rpmdevtools-7.10-1.fc14 has been submitted as an update for Fedora 14.
rpmdevtools-7.10-1.fc13 has been submitted as an update for Fedora 13.
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
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.
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.