List Info

Thread: How to check updates of rpm packages




How to check updates of rpm packages
user name
2006-09-18 16:43:35
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.glogerdaimlerchrysler.com__________________________________
_____________
Rpm-python-list mailing list
Rpm-python-listlinux.duke.edu
https://lists.dulug.duke.edu/mailman/listinfo/rpm-p
ython-list
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )