cookutils rev 677
Treat all arch the same way (fix pkgs counting in web interface)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 30 00:34:48 2014 +0200 (2014-04-30) |
parents | d39012c42de3 |
children | 00c89537b9d4 |
files | cook cooker web/cooker.cgi |
line diff
1.1 --- a/cook Sat Apr 26 11:00:36 2014 +0200 1.2 +++ b/cook Wed Apr 30 00:34:48 2014 +0200 1.3 @@ -1160,13 +1160,11 @@ 1.4 esac 1.5 sed -i \ 1.6 -e s"/CFLAGS=.*/CFLAGS=\"$flags\"/" \ 1.7 - -e s"/HOST_SYSTEM=.*/HOST_SYSTEM=$host/" \ 1.8 - /etc/slitaz/cook.conf 1.9 + -e s"/HOST_SYSTEM=.*/HOST_SYSTEM=$host/" /etc/slitaz/cook.conf 1.10 . /etc/slitaz/cook.conf 1.11 sysroot=$CROSS_TREE/sysroot 1.12 tools=/cross/$arch/tools 1.13 root=$sysroot 1.14 - CC=$tools/bin/${HOST_SYSTEM}-gcc 1.15 # L10n: keep the same width of translations to get a consistent view 1.16 _ "Target arch : \$ARCH" 1.17 _ "Configure args : \$CONFIGURE_ARGS" 1.18 @@ -1188,7 +1186,7 @@ 1.19 colorize 36 $(_ "WARNING: (e)glibc-base is not installed in sysroot") 1.20 fi 1.21 # Show GCC version or warn if not yet compiled. 1.22 - if [ -x $CC ]; then 1.23 + if [ -x "$tools/bin/${HOST_SYSTEM}-gcc" ]; then 1.24 _ "Cross compiler : \${HOST_SYSTEM}-gcc" 1.25 else 1.26 colorize 36 $(_ "C compiler is missing: \${HOST_SYSTEM}-gcc")
2.1 --- a/cooker Sat Apr 26 11:00:36 2014 +0200 2.2 +++ b/cooker Wed Apr 30 00:34:48 2014 +0200 2.3 @@ -470,23 +470,18 @@ 2.4 2.5 # Handle cross compilation. Create arch packages DB and remove pkgs 2.6 # not cooked for this arch from the commits list. 2.7 - case "$ARCH" in 2.8 - arm) 2.9 - arch_db | log_commits 2.10 - for pkg in $(cat $commits) 2.11 - do 2.12 - if [ ! -f "$wok/$pkg/arch.$ARCH" ]; then 2.13 - echo "Cooker arch : skip $pkg (not included in: $ARCH)" | \ 2.14 - log_commits 2.15 - sed -i "/^${pkg}$/"d $commits 2.16 - fi 2.17 - done ;; 2.18 - i486) 2.19 - echo "Cooker arch : $ARCH (default)" | log_commits ;; 2.20 - *) 2.21 - echo "Cooker arch : $ARCH" | log_commits ;; 2.22 - esac 2.23 - 2.24 + arch_db 2.25 + for pkg in $(cat $commits) 2.26 + do 2.27 + if [ ! -f "$wok/$pkg/arch.$ARCH" ]; then 2.28 + echo "Cooker arch : skip $pkg (not included in: $ARCH)" | \ 2.29 + log_commits 2.30 + sed -i "/^${pkg}$/"d $commits 2.31 + else 2.32 + echo "Cooker arch : $ARCH" | log_commits 2.33 + fi 2.34 + done 2.35 + 2.36 # Stats 2.37 pkgs=$(cat $commits | wc -l) 2.38 echo "Packages to cook: $pkgs" | log
3.1 --- a/web/cooker.cgi Sat Apr 26 11:00:36 2014 +0200 3.2 +++ b/web/cooker.cgi Wed Apr 30 00:34:48 2014 +0200 3.3 @@ -301,11 +301,7 @@ 3.4 fi 3.5 # Main page with summary. Count only package include in ARCH, 3.6 # use 'cooker arch' to manually create arch.$ARCH files. 3.7 - # We may have arm only packages, use arch.i486 ? 3.8 - case "$ARCH" in 3.9 - arm|x86_64) inwok=$(ls $WOK/*/arch.$ARCH | wc -l) ;; 3.10 - *) inwok=$(ls $WOK | wc -l) ;; 3.11 - esac 3.12 + inwok=$(ls $WOK | wc -l) 3.13 cooked=$(ls $PKGS/*.tazpkg | wc -l) 3.14 unbuilt=$(($inwok - $cooked)) 3.15 pct=0