Pagina 1 di 1

How Refresh exactly all installed packages

Inviato: mar 6 feb 2007, 3:09
da fifi1234
How I can re-install EXACTLY (same name/version number) the installed packages, from package files inside a folder? Has someone a script for this ???


From a lot of .tgz files inside a folder, from diferent sources (official Slackware, linuxpkgs, slacky), I want that these AND ONLY EXACTLY THESE which are installed, will be overcopied/reinstalled. To refresh them because during long time, perhaps some files gone damaged. Someone knows for this a program or script ??

Inviato: mar 6 feb 2007, 8:22
da mauro
I would try (from the folder where you keep your .tgz in):

Codice: Seleziona tutto

upgradepkg --reinstall /var/log/packages/*
In this ways you are giving to upgradepkg the exact version of the packages you are willing to reinstall.
(you will receive a lot of "not found messages" too, if you don't have in the tgz folder all the packages you have installed in your system, but it should be OK )

Be sure to _not_ have aaa_elflibs and aaa_base in your tgz archive folder !

Inviato: mar 6 feb 2007, 8:35
da mauro
No, I posted a wrong suggestion. In that way we are telling to upgradepkg to search for the .tgz files in the /var/log/packages dir, use the line below instead:

Codice: Seleziona tutto

for a in /var/log/packages/*; do upgradepkg --reinstall  "`echo $a| cut -d/ -f5`"; done

Inviato: mar 6 feb 2007, 22:03
da fifi1234
Yes, the 1st solution would install ALL packages in the folder, and it would remains that version with the highest number, but often I have installed versions with a lower number (f.ex. dbus-0.62 rather than dbus-1.03). The 2nd solution seems to be good. Im testing it, and later I apply it, after I report what happened.