Annotation of /branches/mage-next/usr/lib/mage/ldd-fix.sh
Parent Directory | Revision Log
Revision 169 -
(hide annotations)
(download)
(as text)
Sun Jul 31 11:57:05 2005 UTC (18 years, 9 months ago) by niro
Original Path: trunk/mage/usr/lib/mage/ldd-fix.sh
File MIME type: application/x-sh
File size: 936 byte(s)
Sun Jul 31 11:57:05 2005 UTC (18 years, 9 months ago) by niro
Original Path: trunk/mage/usr/lib/mage/ldd-fix.sh
File MIME type: application/x-sh
File size: 936 byte(s)
fixed locale issue; pkgs get not build or installed if the default system local ist another than LC_ALL=C
1 | niro | 82 | #!/bin/bash |
2 | niro | 169 | # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/ldd-fix.sh,v 1.3 2005-07-31 11:54:02 niro Exp $ |
3 | niro | 82 | |
4 | if [ -z "$1" ] | ||
5 | then | ||
6 | echo "$(basename $0) /path/to" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | PACKAGES_TO_CHECK="" | ||
11 | |||
12 | niro | 169 | # export the default C locale |
13 | export LC_ALL=C | ||
14 | |||
15 | niro | 82 | echo "Checking all files for dynamic link issues ... this may take a while ..." |
16 | niro | 87 | for file in $(find $1 -mount -type f) |
17 | niro | 82 | do |
18 | if [ -x ${file} -a ! -L ${file} ] | ||
19 | then | ||
20 | i=$(ldd ${file} | grep 'not found') | ||
21 | if [ -n "${i}" ] | ||
22 | then | ||
23 | #echo " ${file} fix me" | ||
24 | x=$(grep -irl ${file} /var/db/mage/*) | ||
25 | #echo DEBUG:$x | ||
26 | if [ -n "${x}" ] | ||
27 | then | ||
28 | for pkg in ${x} | ||
29 | do | ||
30 | k=$(basename $(dirname ${pkg})) | ||
31 | if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ] | ||
32 | then | ||
33 | PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}" | ||
34 | fi | ||
35 | done | ||
36 | else | ||
37 | "no packages found for ${file}" | ||
38 | fi | ||
39 | fi | ||
40 | fi | ||
41 | done | ||
42 | |||
43 | #output | ||
44 | for i in ${PACKAGES_TO_CHECK} | ||
45 | do | ||
46 | echo " ${i}" | ||
47 | done | ||
48 |
Properties
Name | Value |
---|---|
svn:executable | * |