Magellan Linux

Annotation of /trunk/pkgtools/check-missing-files.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2112 - (hide annotations) (download) (as text)
Mon May 13 11:43:09 2013 UTC (11 years ago) by niro
File MIME type: application/x-sh
File size: 944 byte(s)
-added missing files script
1 niro 2112 #!/bin/bash
2    
3     BUILDROOT=/mnt/BUILDROOT-R11-x86_64
4    
5     PKGS=$(MROOT=${BUILDROOT} magequery -i)
6    
7    
8     for pkgname in ${PKGS}
9     do
10     #echo ${pkgname}
11     next=0
12    
13     OLDIFS=$IFS
14     IFS=§
15     while read pathto posix user group mtime md5sum
16     do
17     #echo "${pathto}"
18     if [ ! -e ${BUILDROOT}/${pathto} ]
19     then
20     echo "fixme: ${pkgname} - missing: ${pathto}"
21     PKGS_TO_FIX+=( ${pkgname} )
22     next=1
23     break # one missing, jump t next pkg
24     fi
25     done < ${BUILDROOT}/var/db/mage/${pkgname}/.files
26    
27     if [[ ${next} = 1 ]]
28     then
29     IFS=$OLDIFS
30     continue
31     fi
32    
33     while read pathto posix link mtime
34     do
35     #echo "${pathto}"
36     if [ ! -L ${BUILDROOT}/${pathto} ] && [ ! -e ${BUILDROOT}/${pathto} ]
37     then
38     echo "fixme: ${pkgname} - missing: ${pathto}"
39     PKGS_TO_FIX+=( ${pkgname} )
40     break # one missing, jump t next pkg
41     fi
42     done < ${BUILDROOT}/var/db/mage/${pkgname}/.symlinks
43     IFS=$OLDIFS
44     done
45    
46     echo
47     echo "Fix following pkgs:"
48     for i in ${PKGS_TO_FIX[*]}
49     do
50     echo "${i}"
51     done