cookutils view cookall.sh @ rev 1133

cooker: improve previous commit
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Jan 18 01:49:01 2019 +0200 (2019-01-18)
parents fcc595470268
children
line source
1 #!/bin/sh
3 DONELIST=${1:-/tmp/donelist}
5 . /etc/slitaz/cook.conf
6 . $WOK/slitaz-toolchain/receipt
7 SLITAZ_TOOLCHAIN="slitaz-toolchain $DEPENDS"
8 touch $DONELIST
9 while true; do
10 chmod +x $DONELIST
11 for i in $WOK/*/receipt; do
12 pkg=$(basename ${i%/receipt})
13 grep -q "^$pkg$" $DONELIST && continue
14 grep -q "^$pkg$" $CACHE/broken && continue
15 unset BUILD_DEPENDS WANTED
16 HOST_ARCH="i486"
17 . $i
18 case " $HOST_ARCH " in
19 *\ i486\ *|*\ any\ *);;
20 *) continue;;
21 esac
22 for j in $WANTED; do
23 grep -q "^$j$" $DONELIST || continue 2
24 grep -q "^$j$" $CACHE/broken && continue 2
25 done
26 for j in $BUILD_DEPENDS; do
27 case " $SLITAZ_TOOLCHAIN " in
28 *\ $j\ *) continue;;
29 esac
30 grep -q "^$j$" $DONELIST || continue 2
31 grep -q "^$j$" $CACHE/broken && continue 2
32 done
33 cooker pkg $PACKAGE
34 [ $PKGS/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
35 echo $PACKAGE >> $DONELIST
36 chmod -x $DONELIST
37 done
38 [ -x $DONELIST ] || continue
39 # try to break build dep loops...
40 for pkg in gettext python udev cups libQtClucene menu-cache tzdata; do
41 grep -q "^$pkg$" $DONELIST && continue
42 grep -q "^$pkg$" $CACHE/broken && continue
43 . $WOK/$pkg/receipt
44 cooker pkg $PACKAGE
45 [ $PKGS/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue
46 echo $PACKAGE >> $DONELIST
47 continue 2
48 done
49 break
50 done
52 TODOLIST=/tmp/todolist
53 # list packages to build and their (build) dependancies
54 for i in $WOK/*/receipt; do
55 grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue
56 unset BUILD_DEPENDS WANTED
57 HOST_ARCH="i486"
58 . $i
59 case " $HOST_ARCH " in
60 *\ i486\ *|*\ any\ *);;
61 *) continue;;
62 esac
63 grep -q "^$PACKAGE$" $CACHE/broken && echo -n "broken/"
64 echo -n "$PACKAGE : "
65 for j in $BUILD_DEPENDS $WANTED; do
66 grep -q "^$j$" $DONELIST || echo -n "$j "
67 grep -q "^$j$" $CACHE/broken && echo -n "broken/$j "
68 done
69 echo
70 done > $TODOLIST
71 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST"