cookutils annotate cookall.sh @ rev 853
cooker.cgi: sort doc links
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 20 12:55:39 2016 +0100 (2016-12-20) |
parents | 8f8775f51542 |
children | 4e8c86306ce2 |
rev | line source |
---|---|
pascal@706 | 1 #!/bin/sh |
pascal@706 | 2 |
pascal@706 | 3 DONELIST=${1:-/tmp/donelist} |
pascal@706 | 4 |
slaxemulator@716 | 5 . /etc/slitaz/cook.conf |
slaxemulator@716 | 6 . $WOK/slitaz-toolchain/receipt |
pascal@706 | 7 SLITAZ_TOOLCHAIN="slitaz-toolchain $DEPENDS" |
pascal@706 | 8 touch $DONELIST |
pascal@706 | 9 while true; do |
pascal@706 | 10 chmod +x $DONELIST |
slaxemulator@716 | 11 for i in $WOK/*/receipt ; do |
pascal@707 | 12 pkg=$(basename ${i%/receipt}) |
pascal@707 | 13 grep -q "^$pkg$" $DONELIST && continue |
slaxemulator@716 | 14 grep -q "^$pkg$" $CACHE/broken && continue |
pascal@706 | 15 unset BUILD_DEPENDS WANTED |
pascal@708 | 16 HOST_ARCH="i486" |
pascal@706 | 17 . $i |
pascal@708 | 18 case " $HOST_ARCH " in |
pascal@708 | 19 *\ i486\ *|*\ any\ *);; |
pascal@708 | 20 *) continue;; |
pascal@708 | 21 esac |
pascal@712 | 22 for j in $WANTED ; do |
pascal@712 | 23 grep -q "^$j$" $DONELIST || continue 2 |
slaxemulator@716 | 24 grep -q "^$j$" $CACHE/broken && continue 2 |
pascal@712 | 25 done |
pascal@710 | 26 for j in $BUILD_DEPENDS ; do |
pascal@706 | 27 case " $SLITAZ_TOOLCHAIN " in |
pascal@706 | 28 *\ $j\ *) continue ;; |
pascal@706 | 29 esac |
pascal@706 | 30 grep -q "^$j$" $DONELIST || continue 2 |
slaxemulator@716 | 31 grep -q "^$j$" $CACHE/broken && continue 2 |
pascal@706 | 32 done |
pascal@706 | 33 cooker pkg $PACKAGE |
slaxemulator@716 | 34 [ $PKGS/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue |
pascal@706 | 35 echo $PACKAGE >> $DONELIST |
pascal@706 | 36 chmod -x $DONELIST |
pascal@706 | 37 done |
pascal@706 | 38 [ -x $DONELIST ] || continue |
pascal@706 | 39 # try to break build dep loops... |
pascal@713 | 40 for pkg in gettext python udev cups libQtClucene menu-cache tzdata ; do |
pascal@707 | 41 grep -q "^$pkg$" $DONELIST && continue |
slaxemulator@716 | 42 grep -q "^$pkg$" $CACHE/broken && continue |
slaxemulator@716 | 43 . $WOK/$pkg/receipt |
pascal@706 | 44 cooker pkg $PACKAGE |
slaxemulator@716 | 45 [ $PKGS/$PACKAGE-$VERSION*.tazpkg -nt $DONELIST ] || continue |
pascal@706 | 46 echo $PACKAGE >> $DONELIST |
pascal@706 | 47 continue 2 |
pascal@706 | 48 done |
pascal@706 | 49 break |
pascal@706 | 50 done |
pascal@706 | 51 |
pascal@706 | 52 TODOLIST=/tmp/todolist |
pascal@706 | 53 # list packages to build and their (build) dependancies |
slaxemulator@716 | 54 for i in $WOK/*/receipt ; do |
pascal@706 | 55 grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue |
pascal@706 | 56 unset BUILD_DEPENDS WANTED |
pascal@708 | 57 HOST_ARCH="i486" |
pascal@706 | 58 . $i |
pascal@708 | 59 case " $HOST_ARCH " in |
pascal@708 | 60 *\ i486\ *|*\ any\ *);; |
pascal@708 | 61 *) continue;; |
pascal@708 | 62 esac |
pascal@754 | 63 grep -q "^$PACKAGE$" $CACHE/broken && echo -n "broken/" |
pascal@706 | 64 echo -n "$PACKAGE : " |
pascal@706 | 65 for j in $BUILD_DEPENDS $WANTED ; do |
pascal@706 | 66 grep -q "^$j$" $DONELIST || echo -n "$j " |
pascal@754 | 67 grep -q "^$j$" $CACHE/broken && echo -n "broken/$j " |
pascal@706 | 68 done |
pascal@706 | 69 echo |
pascal@706 | 70 done > $TODOLIST |
pascal@706 | 71 echo "$(wc -l $TODOLIST) packages unbuilt in $TODOLIST" |
pascal@706 | 72 |