The time now is Tue 18 Jun 2013, 00:44
All times are UTC - 4 |
| Author |
Message |
jrb

Joined: 11 Dec 2007 Posts: 974 Location: Smithers, BC, Canada
|
Posted: Sat 11 Feb 2012, 16:29 Post subject:
Make your pinstall.sh script work in all puppies Subject description: Create links to different versions of libs |
|
A while ago I wanted to make sox-14.3.0-p4.pet work in all the current versions of Puppy: wary, racy, lucid and slacko.
This version of sox was compiled for the puppy4 series (430?) and all its dependencies were included in that series. Howvever when installed in wary, racy, lucid or slacko it was missing the following libs:
libao.so.2
libavcodec.so.51
libavformat.so.51
libavutil.so.49
All the aforenamed puppies have versions of these libs, but not the ones required and they have differing versions among themselves. Easy enough to go in and make the symlinks if you know how, and how to figure out what’s missing, but why have to bother?
Here’s the pinstall.sh script that I came up with to handle the situation:
| Code: | #!/bin/sh
cd /usr/lib
#for libao
AO=`ls --file-type libao.so.* | grep -v @`
ln -s $AO -T libao.so.2
#for libavcodec.so
AVC=`ls --file-type libavcodec.so.* | grep -v @`
ln -s $AVC -T libavcodec.so.51
#for libavformat.so
AVF=`ls --file-type libavformat.so.* | grep -v @`
ln -s $AVF -T libavformat.so.51
#for libavutil.so
AVU=`ls --file-type libavutil.so.* | grep -v @`
ln -s $AVU -T libavutil.so.49 |
Line 1, “cd /usr/lib” tells bash to work in the /usr/lib directory
Line 4, “AO=`ls --file-type libao.so.* | grep -v @`” sets a variable named AO that will list (ls) all the occurences of libao.so (libao.so*) in /usr/lib. The --file-type parameter tells ls to indicate symlinks with an @ sign. The “| grep -v @” tells bash to leave out the files marked with an @. So all the files listed should be actual files, not symlinks.
Line5, “ln -s $AO -T libao.so.2” makes a symlink from the file found in line4 named “libao.so.2”.
So sox is happy and works in all the puppies and I’m happy that I didn’t have to make all those symlinks by hand.
Comments, improvements welcomed.
Cheers, J
_________________ SFS-TCZ_Linker, http://puppylinuxstuff.meownplanet.net/choicepup/ user=puppy, password=linux
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2199 Location: UK
|
Posted: Mon 20 Feb 2012, 14:56 Post subject:
|
|
Maybe this could be integrated into the petget scripts,
so that when installing a .pet and missing deps are found,
your Puppy will search for other versions, and make symlinks, if possible...
Although in certain cases it is sure to cause 'mares...
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
jrb

Joined: 11 Dec 2007 Posts: 974 Location: Smithers, BC, Canada
|
Posted: Wed 22 Feb 2012, 02:05 Post subject:
|
|
| sc0ttman wrote: | Maybe this could be integrated into the petget scripts,
so that when installing a .pet and missing deps are found,
your Puppy will search for other versions, and make symlinks, if possible...
Although in certain cases it is sure to cause 'mares... |
Hi sc0ttman,
I'm away from home on holiday right now, the missus wanted to get away from 60cm of snow, so I haven't really got an opportunity to try anything along the lines you suggest.
When I first read your post I agreed with you about the "mares" but then after thinking about it I realized that if the proper lib or link already existed then ln would just come back with an error message saying "File exists". So what else could go wrong?
I'm not a compiler (not much anyway) so I will probably only use this when adapting older .pets or bins from other distros but you may well be right about it having broader applications.
Cheers from sunny and warm (and windy, and wet) Kauai, J
_________________ SFS-TCZ_Linker, http://puppylinuxstuff.meownplanet.net/choicepup/ user=puppy, password=linux
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|