If I understand this correctly you want to replace all your SlackBuild packages with equivalent ones from Alien Bob's repository (where they are available).
If yes, here is one way to do the following:
Quote:
Originally Posted by allend
1) Creating a list of files to be upgraded, perhaps starting with 'ls /var/log/packages | grep SBo'
2) Use some sed magic to modify that file so that you can copy the list into a download program such as lftp.
3) Collect the downloaded files in a single directory so that you can run 'upgradepkg --reinstall *.t?z'
For fifty odd files you would probably also want to check md5sums on the downloaded files.
|
Use the following to make a list of all the SBo packages you have installed (minus their version or architecture information):
Code:
( cd /var/log/packages/ ; ls *SBo | rev | cut -f 4- -d - | rev | sed 's,.*,/\0-,' > /tmp/SBo-pkg.lst )
You could then use this list to grep against Alien Bob's FILELIST.TXT to see if he has equivalent packages. Then pipe the result through sed to create a nicely formatted list of links to the relevant packages and their md5sum files. In your case you probably want the 64-Bit 13.37 packages given that you list Slackware64-Current as your distribution.
So perhaps something like this:
Code:
wget -qO- http://connie.slackware.com/~alien/slackbuilds/FILELIST.TXT | grep -f /tmp/SBo-pkg.lst | sed -nr 's,.* \./(.*/pkg64/13.37.*(t.z|md5|asc))$,http://connie.slackware.com/~alien/slackbuilds/\1,p' > /tmp/alien-pkg.urls
You can now use this as a list that you feed to wget to download all of the packages. Before you do that, I would suggest having a quick look at /tmp/alien-pkg.urls in a text editor, since I have not made any note of the version numbers. So there is a chance that some of Alien Bob's packages are older and hence you
might end up downgrading to an older version. Remove any lines you don't want and save the file again.
When the list looks correct to you, just switch to a suitable empty directory and issue.
Code:
wget -i /tmp/alien-pkg.urls
Now check the md5sums as follows:
Code:
cat *.md5 | md5sum -c
Assuming you had already imported
Alien Bob's GPG-KEY previously, you could verify the signatures of the downloaded files as follows:
Code:
find . -name "*.asc" -maxdepth 1 -printf "\n%f\n" -exec gpg --verify {} \;
If they are all OK, you can install with:
Code:
upgradepkg --reinstall *.t?z
To keep up to date you can either just use
Alien Bob's repository RSS feed to get notified of updates or you could write a short shell script that uses various meta data files in his repository to do something smarter.