Quantcast
Channel: Madabar.techblog
Viewing all articles
Browse latest Browse all 10

Sorting package version strings

$
0
0
Interesting less trivial than expected problem (solved): sorting package version numbers: import re import rpm def get_package_version(name): """Return version string of installed package.""" # note: ts can take an argument that is the root of the installation # typically with a var/lib/rpm directory underneath it. transaction_set = rpm.ts() versions = [header['provideversion'][0] for header in transaction_set.dbMatch('name', [...]

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images