[Yum] How to verify from a pre scriptlet that yum is installing and not updating the RPM package.
rouilj-yum at renesys.com
Thu Nov 16 04:33:04 UTC 2006
A while back I asked how to make yum install a package rather than
upgrade it. I have modified the yum.conf to include a line like:
installonlypkgs=kernel, kernel-smp, kernel-bigmem, kernel-enterprise,
kernel-debug, kernel-unsupported, sec
(Line was split for dispaly, it's all on one line in the config file.
I assume it must have all of the packges listed on the same line, does
anybody know if there is a line length limit because this line will be
My RPM's have a pre(install) scriptlet that verifies that they are
being installed and not updated. If I install with rpm, I can parse
the command line ofx the parent process of the scriptlet and verify
that -i or --install was used rather than -U or --update.
How can I verify the same when installing under yum? I want to make
sure that installonlypkgs is properly set and the package is being
installed and not updated.
Since yum does the work internally, all I get as the parent to my
/usr/bin/python /usr/bin/yum install sec
which doesn't really tell me if the package is being installed or
updated. I could grep yum.conf for the package name I guess but that
sounds very error prone (might match a substring etc). Is there any
way to query the parent yum process to find out what mode it is
employing to process the package?
Does anybody have any other ideas on how I can verify that the rpm is
being installed and not updated by yum?
Thanks for your help.
603-643-9300 x 111
More information about the Yum