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', [...]
Trending Articles
More Pages to Explore .....