cookutils view cookall.sh @ rev 727
cook: pkgdb: download "mirrors" file from mirror1.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun May 03 19:43:46 2015 +0300 (2015-05-03) |
parents | 3ebd308cccc7 |
children | fcc595470268 |
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 echo -n "$PACKAGE : "
64 for j in $BUILD_DEPENDS $WANTED ; do
65 grep -q "^$j$" $DONELIST || echo -n "$j "
66 done
67 echo
68 done > $TODOLIST
69 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST"