From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: You have a number of rpms in a directory that you want to make sure are installed and up to date, so you call "rpm -U *.rpm" However, this will only work if NONE of the rpms are already up to date. If any in the upgrade list are already up to date, packages that aren't already installed are completely ignored! Behavior should be to upgrade or install all packages as needed. Version-Release number of selected component (if applicable): rpm-4.2-0.69 How reproducible: Always Steps to Reproduce: 1. Get two rpms, one that is installed [RPM1] and up to date, and another that isn't installed at all [RPM2]. 2. Run "rpm -U [RPM1] [RPM2]" Actual Results: warning that RPM1 is installed is printed and RPM2 is NOT installed Expected Results: warning that RPM1 is installed, RPM2 installed Additional info:
Try --freshen (or -F) instead of --update (or -U).
I need to upgrade AND/OR install new packages at the same time. -freshen does not install new packages, so that won't work.
Then you will need to write a shell script to accomplish. Here's a lightly tested example to get you started: #!/bin/sh for fn in *.rpm do N="`rpm -qp --qf '%{name}' $fn 2> /dev/null`" if rpm -q $N >& /dev/null; then echo "$N is already installed, use rpm -Fvh $fn" else echo "$N is not installed, use rpm -Uvh $fn" fi done
The reason for the failure is looking forward to find out. Take a look at https://hotrabatte.com/