Magellan Linux

Diff of /branches/mage-next/src/tools/ldd-fix.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 169 by niro, Sun Jul 31 11:57:05 2005 UTC revision 1782 by niro, Mon Mar 12 23:23:02 2012 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $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 $  # $Id$
3    
4  if [ -z "$1" ]  if [ -z "$@" ]
5  then  then
6   echo "$(basename $0) /path/to"   echo "$(basename $0) /path/to"
7   exit 1   exit 1
# Line 13  PACKAGES_TO_CHECK="" Line 13  PACKAGES_TO_CHECK=""
13  export LC_ALL=C  export LC_ALL=C
14    
15  echo "Checking all files for dynamic link issues ... this may take a while ..."  echo "Checking all files for dynamic link issues ... this may take a while ..."
16  for file in $(find $1 -mount -type f)  for file in $(find $@ -mount -type f)
17  do  do
18   if [ -x ${file} -a ! -L ${file} ]   if [ -x ${file} -a ! -L ${file} ]
19   then   then
20   i=$(ldd ${file} | grep 'not found')   i=$(ldd ${file} | grep 'not found')
21   if [ -n "${i}" ]   if [ -n "${i}" ]
22   then   then
23   #echo "    ${file} fix me"   x=$(grep -irl ${file}§ /var/db/mage/*)
  x=$(grep -irl ${file} /var/db/mage/*)  
24   #echo DEBUG:$x   #echo DEBUG:$x
25   if [ -n "${x}" ]   if [ -n "${x}" ]
26   then   then
# Line 32  do Line 31  do
31   then   then
32   PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}"   PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}"
33   fi   fi
34     echo -e "\npkg: ${k}"
35   done   done
36   else   else
37   "no packages found for ${file}"   "no packages found for ${file}"
38     echo -e "\npkg: not managed"
39   fi   fi
40    
41     echo "    fix me: ${file}"
42     echo "${i}" | while read line; do echo "                -> ${line}";done
43   fi   fi
44   fi   fi
45  done  done
46    
47  #output  # output
48    echo -e "\n\nPlease check following packages:"
49  for i in ${PACKAGES_TO_CHECK}  for i in ${PACKAGES_TO_CHECK}
50  do  do
51   echo "       ${i}"   echo "       ${i}"
52  done  done
53    
54    

Legend:
Removed from v.169  
changed lines
  Added in v.1782