Magellan Linux

Diff of /branches/mage-next/usr/lib/mage/ldd-fix.sh

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

trunk/mage/usr/lib/mage/ldd-fix.sh revision 1111 by niro, Wed Jul 14 17:37:07 2010 UTC branches/mage-next/usr/lib/mage/ldd-fix.sh revision 2525 by niro, Wed Jan 29 10:42:21 2014 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Id$  # $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   x=$(grep -irl ${file}§ /var/db/mage/*)   x=$(magequery -e ${file})
24   #echo DEBUG:$x   #echo DEBUG:$x
25   if [ -n "${x}" ]   if [ -n "${x}" ]
26   then   then
27   for pkg in ${x}   for pkg in ${x}
28   do   do
29   k=$(basename $(dirname ${pkg}))   k="${pkg}"
30   if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ]   if [ -z "$(echo ${PACKAGES_TO_CHECK} | grep ${k})" ]
31   then   then
32   PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}"   PACKAGES_TO_CHECK="${PACKAGES_TO_CHECK} ${k}"

Legend:
Removed from v.1111  
changed lines
  Added in v.2525