[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Script to fix library dependencies



Here is a script that fixes the .shlibs files in
/var/lib/dpkg/info/*.shlibs according to what we discussed recently.
It will allow the use of any library with the same major and minor but
will leave freedom to use any patchlevel and delta

Sharable Library Version = Major.Minor.Patchlevel-Debian Delta

If you run this script you will be able to run bo and build
build packages that can be installed on rex.

Bo uses libc5 5.4.17-x
Rex uses libc5 5.4.13-x

If you compile a package under bo you will get a dependency

libc5 (>=5.4.17-1)

No one will be able to install that package under rex without upgrading to
the c library in bo. A package like that is not compatible with Debian
1.2!

After running this script the dependency generated will be

libc5 (>=5.4.0-0)

and the packages will run ok in rex.

Run this script without a parameter to view the .shlib dependencies
installed on your system. Run as root and specify "fix" to reset
patchlevels and deltas to zero.

#!/bin/sh
# Pattern replaces the minor and the delta of all installed libraries with 0
PAT="s/ (\(.*\..*\)\..*-.*)/ (\1\.0-0)/g"

for i in /var/lib/dpkg/info/*.shlibs; do
	if grep -q "(" $i >/dev/null; then
		echo "-- $i --"
		cat $i
		if [ "$1" = "fix" ]; then
			sed <$i >/tmp/$$ -e "$PAT"
			mv $i $i.bak
			mv /tmp/$$ $i
		fi
	fi
done
rm -f /tmp/$$

--- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ ---
PGP Public Key  =  FB 9B 31 21 04 1E 3A 33  C7 62 2F C0 CD 81 CA B5 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: