Hi,
is there an easy python way to check which of the two (or
more) versions of
a rpm package is newer ??
If I compare the version and release of the header
information I fail since
they return a string value. A comparison of let say
"9.12" and "9.7"
results not in the wanted behavior.
...
fdno_new = os.open(pak_new, os.O_RDONLY)
hdr_new = ts.hdrFromFdno(fdno_new)
fdno_old = os.open(pak_old, os.O_RDONLY)
hdr_old = ts.hdrFromFdno(fdno_old)
if hdr_new['release'] > hdr_old['release']:
# install the newer version
else:
# do nothing
Any ideas ??
Mit freundlichen Grüßen / Kind regards
Joachim Gloger
DaimlerChrysler AG
Research and Technology
Umfeldinterpretation / Machine Perception
Teamleitung Umfelderfassungssysteme
096/U800 – REI/AI
89081 Ulm/Germany
Phone +49-(0)731 505 2353
Fax +49-(0)711 305 211 877 1
Mobile +49-(0)160 86 22 489
mailto: joachim.j.gloger daimlerchrysler.com__________________________________
_____________
Rpm-python-list mailing list
Rpm-python-list linux.duke.edu
https://lists.dulug.duke.edu/mailman/listinfo/rpm-p
ython-list
|