Auto Install Linux Rpm's
Lars Kellogg-Stedman
8273grkci8q8kgt at jetable.net
Wed Nov 16 21:16:08 EST 2005
> We would like to use Python to automatically deploy new rpm's (assuming we
> first edit a file to require a new version). I've just starting looking a
> the rpm module. I can build this from scratch, but was wondering if anyone
> is/has solved some or all of this problem or could point me to some
> "goodies" that would help.
"Yum" (the Fedora package manager) is written in Python, so it provides
both a good example of how to work with the Python rpm module and how to
do things like handle dependencies -- which you'll have to do if you
roll your own.
If I were you, I would probably just use Yum to do all the heavy
lifting, rather than trying to re-implement it. Then your work boils
down to:
IF (installed version of package) != (version of package in config
file) THEN
yum -y install <package>
END IF
-- Lars
--
Lars Kellogg-Stedman <8273grkci8q8kgt at jetable.net>
This email address will expire on 2005-11-23.
More information about the Python-list
mailing list