cookutils view cookall.sh @ rev 709

cookall.sh: check broken bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 06 12:49:48 2015 +0100 (2015-03-06)
parents 372c6cceec71
children 37b0b472526a
line source
1 #!/bin/sh
3 DONELIST=${1:-/tmp/donelist}
5 . /home/slitaz/wok/slitaz-toolchain/receipt
6 SLITAZ_TOOLCHAIN="slitaz-toolchain $DEPENDS"
7 touch $DONELIST
8 while true; do
9 chmod +x $DONELIST
10 for i in /home/slitaz/wok/*/receipt ; do
11 pkg=$(basename ${i%/receipt})
12 grep -q "^$pkg$" $DONELIST && continue
13 grep -q "^$pkg$" /home/slitaz/cache/broken && continue
14 unset BUILD_DEPENDS WANTED
15 HOST_ARCH="i486"
16 . $i
17 case " $HOST_ARCH " in
18 *\ i486\ *|*\ any\ *);;
19 *) continue;;
20 esac
21 for j in $BUILD_DEPENDS $WANTED ; do
22 case " $SLITAZ_TOOLCHAIN " in
23 *\ $j\ *) continue ;;
24 esac
25 grep -q "^$j$" $DONELIST || continue 2
26 grep -q "^$j$" /home/slitaz/cache/broken && continue 2
27 done
28 cooker pkg $PACKAGE
29 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
30 echo $PACKAGE >> $DONELIST
31 chmod -x $DONELIST
32 done
33 [ -x $DONELIST ] || continue
34 # try to break build dep loops...
35 for pkg in gettext python udev cups libQtClucene menu-cache ; do
36 grep -q "^$pkg$" $DONELIST && continue
37 grep -q "^$pkg$" /home/slitaz/cache/broken && continue
38 . /home/slitaz/wok/$pkg/receipt
39 cooker pkg $PACKAGE
40 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
41 echo $PACKAGE >> $DONELIST
42 continue 2
43 done
44 break
45 done
47 TODOLIST=/tmp/todolist
48 # list packages to build and their (build) dependancies
49 for i in /home/slitaz/wok/*/receipt ; do
50 grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue
51 unset BUILD_DEPENDS WANTED
52 HOST_ARCH="i486"
53 . $i
54 case " $HOST_ARCH " in
55 *\ i486\ *|*\ any\ *);;
56 *) continue;;
57 esac
58 echo -n "$PACKAGE : "
59 for j in $BUILD_DEPENDS $WANTED ; do
60 grep -q "^$j$" $DONELIST || echo -n "$j "
61 done
62 echo
63 done > $TODOLIST
64 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST"