Quoting Lars Hecking (lhecking at users.sourceforge.net):
> Would this be considered a bug, or am I simply going about it the wrong way?
>> The alternative approach is to test eaach rpm individually, build a list
> of those that are not installed, and then rpm -Uhv $list.
[ Another hack enters... ]
If you just need a set of RPM's installed, there's another you can do
this when wrapping the install. If order does matter, then you had
better get it right first time.
If the order doesn't matter, you can just check each rpm with --test like:
rpm --test --replacefiles -Uvh --nodeps
and if the exit code is 0, add that package to the list to be installed.
So go over each RPM one by one and check if it's new or not.
This way you can run the same script over $x amount of packages and
always have only the newest files installed.
But if you are going to spend time and effort getting it right, there's
always yum or apt.
Thanks,
David
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!