cookutils view cookall.sh @ rev 707

cookall.sh: skip broken packages
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 04 10:58:57 2015 +0100 (2015-03-04)
parents 073f946f667b
children 372c6cceec71
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 . $i
16 for j in $BUILD_DEPENDS $WANTED ; do
17 case " $SLITAZ_TOOLCHAIN " in
18 *\ $j\ *) continue ;;
19 esac
20 grep -q "^$j$" $DONELIST || continue 2
21 done
22 cooker pkg $PACKAGE
23 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
24 echo $PACKAGE >> $DONELIST
25 chmod -x $DONELIST
26 done
27 [ -x $DONELIST ] || continue
28 # try to break build dep loops...
29 for pkg in gettext python udev cups libQtClucene menu-cache ; do
30 grep -q "^$pkg$" $DONELIST && continue
31 grep -q "^$pkg$" /home/slitaz/cache/broken && continue
32 . /home/slitaz/wok/$pkg/receipt
33 cooker pkg $PACKAGE
34 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
35 echo $PACKAGE >> $DONELIST
36 continue 2
37 done
38 break
39 done
41 TODOLIST=/tmp/todolist
42 # list packages to build and their (build) dependancies
43 for i in /home/slitaz/wok/*/receipt ; do
44 grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue
45 unset BUILD_DEPENDS WANTED
46 . $i
47 echo -n "$PACKAGE : "
48 for j in $BUILD_DEPENDS $WANTED ; do
49 grep -q "^$j$" $DONELIST || echo -n "$j "
50 done
51 echo
52 done > $TODOLIST
53 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST"