LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Upgrading packages from Alien Bob Repo (https://www.linuxquestions.org/questions/slackware-14/upgrading-packages-from-alien-bob-repo-908444/)

deto86 10-16-2011 10:41 AM

Upgrading packages from Alien Bob Repo
 
I compiled some packages, especially development/multimedia libraries from Slackbuilds.org in order to run dvds,mp3s etc.And,now I want to upgrade the installed packages from Alien Bob repository.Is it possible to upgrade by using slackpkg or upgradepkg command?
I am running 64bit Slackware-Current

allend 10-16-2011 10:47 AM

You can use 'upgradepkg --reinstall newpackagename [newpackagename2]' to do this.
As the packages you want to install are not "official", then slackpkg will not recognise them.

deto86 10-16-2011 10:59 AM

Thanks for the quick reply.
But,I really don't want to manually download a package and then upgrade it by using upgradepkg.
I want to upgrade those packages like "slackpkg upgrade-all" command upgrade does by specifying the Alien Bob repository's url .Bcoz,there are more than 50 packages which I have compiled from Slackbuilds

sycamorex 10-16-2011 11:06 AM

Quote:

Originally Posted by deto86 (Post 4499861)
Thanks for the quick reply.
But,I really don't want to manually download a package and then upgrade it by using upgradepkg.
I want to upgrade those packages like "slackpkg upgrade-all" command upgrade does by specifying the Alien Bob repository's url .Bcoz,there are more than 50 packages which I have compiled from Slackbuilds

If slackbuilds.org have updated any of the packages since you compiled them, you could use sbopkg (a slackbuilds browser) to automatically detect any updates and install them automatically.

allend 10-16-2011 11:27 AM

I am not aware of a tool like slackpkg for accessing http://connie.slackware.com/~alien/slackbuilds/
You could automate this somewhat by:
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.

deto86 10-16-2011 12:16 PM

Thanks for the reply.I will try both of your methods

tomtomjkw 10-16-2011 10:30 PM

You can also use slapt-get.

deto86 10-17-2011 12:43 AM

Quote:

Originally Posted by tomtomjkw (Post 4500205)
You can also use slapt-get.

Is it possible to upgrade those installed packages from Alien Bob's repo using slapt-get?
I never use slapt-get before ,but if it works then is there any conflict in packages,i.e installation of two packages twice.Because as far as I know Slackbuilds use _SBo in their package naming and Alien Bob use alien.
Correct me if I am wrong.
IS it possible to change the mirror of sbopkg uses to Alien Bob's repository?Bcoz,what it does is sync your installed package list with the Slackbuids.org and then it performs the upgrade.
Thanks by the way

ruario 10-17-2011 02:31 AM

Quote:

Originally Posted by deto86 (Post 4500251)
IS it possible to change the mirror of sbopkg uses to Alien Bob's repository?

No sbopkg only works with SlackBuids.org and mirrors. It expects a Slackbuild and associated files. It does not expect binary packages.

ruario 10-17-2011 03:23 AM

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 (Post 4499878)
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.

ruario 10-17-2011 03:33 AM

Edit: Deleted and updated examples in the previous post so that it is easier to follow

deto86 10-17-2011 04:27 AM

Thanks ruario.Great answer

ruario 10-17-2011 06:24 AM

@deto86: I updated the first example to create a better grep list and avoid false positive matches (e.g. previously if you had an SBo package with a very short name like 'di' it might have matched other packages much later on). I also updated the second example so that /tmp/alien-pkg.urls includes signature files, in case you want to be extra cautious. ;)

allend 10-17-2011 06:44 AM

Are we having fun yet? :-D

ruario 10-17-2011 06:50 AM

Yes we are, break out the chocolate and let's celebrate! ;)


All times are GMT -5. The time now is 10:52 AM.