cookutils view cookall.sh @ rev 708

cookall.sh: check HOST_ARCH
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 05 12:36:27 2015 +0100 (2015-03-05)
parents fe2e335b9100
children d34f36b8ad46
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 done
27 cooker pkg $PACKAGE
28 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
29 echo $PACKAGE >> $DONELIST
30 chmod -x $DONELIST
31 done
32 [ -x $DONELIST ] || continue
33 # try to break build dep loops...
34 for pkg in gettext python udev cups libQtClucene menu-cache ; do
35 grep -q "^$pkg$" $DONELIST && continue
36 grep -q "^$pkg$" /home/slitaz/cache/broken && continue
37 . /home/slitaz/wok/$pkg/receipt
38 cooker pkg $PACKAGE
39 [ /home/slitaz/packages/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
40 echo $PACKAGE >> $DONELIST
41 continue 2
42 done
43 break
44 done
46 TODOLIST=/tmp/todolist
47 # list packages to build and their (build) dependancies
48 for i in /home/slitaz/wok/*/receipt ; do
49 grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue
50 unset BUILD_DEPENDS WANTED
51 HOST_ARCH="i486"
52 . $i
53 case " $HOST_ARCH " in
54 *\ i486\ *|*\ any\ *);;
55 *) continue;;
56 esac
57 echo -n "$PACKAGE : "
58 for j in $BUILD_DEPENDS $WANTED ; do
59 grep -q "^$j$" $DONELIST || echo -n "$j "
60 done
61 echo
62 done > $TODOLIST
63 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST"