LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Mandy 9.2 - Upgrading only installed packages! (https://www.linuxquestions.org/questions/mandriva-30/mandy-9-2-upgrading-only-installed-packages-185071/)

Mega Man X 05-24-2004 12:45 AM

Mandy 9.2 - Upgrading only installed packages!
 
Hi there!!!

I've downloaded a hole bunch of rpm's to update the system and I put them into a CD. I have like hundreds of rpms in that disk, but I want to upgrade only the packages that are installed... Say, I have gaim 0.70 installed, and in that disk I have a newer package, 0.77, so then upgrade. But that ONLY if I have a previous version installed. If no gaim is installed, then no gaim is upgraded.

Problem is, I was testing with "rpm -U" in a package which was not installed and it got installed...

All those updates rpm's are officials and are all in the same folder, so I need to run a command to upgrade all packages and leave the ones _not_ installed alone... something like "rpm -U *.rpm", but that would not work and would install all packages...

The reason for this is that I'll be upgrading my friend's computer and he has a very slow Internet connection and in that disk, I've a lot of packages not necessary to be installed, even big ones as gnome.

Any ideas about upgrading a mass of rpm's and leaving the ones not installed, well, not installed?

I hope I was clear enough, I suck asking questions...

Thanks in advance!

quatsch 05-24-2004 12:06 PM

since you're using mandrake, use urpmi or rpmdrake.

You can add all the rpms on the CDs to the database (like the way it knows all the packages available on the installation CDs):
urpmi.addmedia --upgrade <name of choice> removable:/mnt/cdrom/rpm (or whatever the path is to the directory where the rpms are)

After this, you can do an upgrade of all installed packages with
urpmi --upgrade --auto-select

Take a look at the man pages for urpmi. It's a very useful tool.

doug_s 05-24-2004 12:16 PM

You need to do rpm -F instead of rpm -U to do what you are trying to accomplish.

Mega Man X 05-24-2004 12:27 PM

Thanks quatsch and doug_s!

I will try them out, really good tips by the way and I did not know any of those ;)

thanks again!


All times are GMT -5. The time now is 07:21 AM.