cookutils diff cook @ rev 1027
cook: remove old package in /home/slitaz/packages and upgrade chroot package when $ARCH is used; provide overstriked "Failed" for prepared packages;
cook.site: remove redundant first part, fix ${sysconfdir} and ${docdir};
lighttpd/index.cgi: support for overstriked "Failed";
modules/compressor: strip_package(): consider *.dbg files (from glibc and gcc packages); make deterministic *.a archives in the simpler way.
cook.site: remove redundant first part, fix ${sysconfdir} and ${docdir};
lighttpd/index.cgi: support for overstriked "Failed";
modules/compressor: strip_package(): consider *.dbg files (from glibc and gcc packages); make deterministic *.a archives in the simpler way.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Feb 02 00:51:10 2018 +0200 (2018-02-02) |
parents | c51331bcb617 |
children | f2773281e93d |
line diff
1.1 --- a/cook Sat Jan 27 11:55:42 2018 +0200 1.2 +++ b/cook Fri Feb 02 00:51:10 2018 +0200 1.3 @@ -1084,9 +1084,9 @@ 1.4 # Find and remove old package only if "release checksum" has changed 1.5 1.6 if [ "$rsum" != "$rsumold" ]; then 1.7 - old_file=$(awk -F$'\t' -vname="$PACKAGE" '{ 1.8 - if ($1 == name) printf("%s-%s.tazpkg", $1, $2); 1.9 - }' $pi) # <name>-<version><extra_version>.tazpkg 1.10 + old_file=$(awk -F$'\t' -vname="$PACKAGE" -varch="$arch" '{ 1.11 + if ($1 == name) printf("%s-%s%s.tazpkg", $1, $2, arch); 1.12 + }' $pi) # <name>-<version><extra_version><-arch>.tazpkg 1.13 if [ -f "$PKGS/$old_file" ]; then 1.14 action 'Removing old package "%s"' "$old_file" 1.15 rm -f "$PKGS/$old_file" 1.16 @@ -1181,7 +1181,7 @@ 1.17 _ 'Updating %s chroot environment...' "$ARCH" 1.18 _ 'Updating chroot: %s' "$i ($VERSION$EXTRAVERSION$arch)" | log 1.19 cd $PKGS 1.20 - tazpkg install $PKGS/$i-$VERSION$EXTRAVERSION$arch.tazpkg --forced --root=$root 1.21 + tazpkg -i "$PKGS/$i-$VERSION$EXTRAVERSION$arch.tazpkg" --forced --root=$root 1.22 fi 1.23 done 1.24 } 1.25 @@ -1192,17 +1192,21 @@ 1.26 install_package() { 1.27 set_paths 1.28 case "$ARCH" in 1.29 - arm*|x86_64) 1.30 + arm*) 1.31 arch="-$ARCH" 1.32 - root="$CROSS_TREE/sysroot" ;; 1.33 + root="$CROSS_TREE/sysroot" 1.34 + ;; 1.35 + x86_64) 1.36 + arch="-$ARCH" 1.37 + ;; 1.38 esac 1.39 # Install package if requested but skip install if target host doesn't 1.40 # match build system or it will break the build chroot. 1.41 build=$(echo $BUILD_SYSTEM | cut -d- -f1) 1.42 if [ -n "$inst" -a "$build" == "$ARCH" ]; then 1.43 - if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ]; then 1.44 + if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION$arch.tazpkg" ]; then 1.45 cd $PKGS 1.46 - tazpkg install $PACKAGE-$VERSION$EXTRAVERSION.tazpkg --forced 1.47 + tazpkg -i "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION$arch.tazpkg" --forced 1.48 else 1.49 broken 1.50 die 'Unable to install package, build has failed.' 1.51 @@ -1563,6 +1567,10 @@ 1.52 put_status() { 1.53 # $1: package, $2: status, one of 'Done', 'Failed' 1.54 sed -i "s|>$1</a>$|& [ $2 ]|" $activity 1.55 + if [ "$2" == 'Done' ]; then 1.56 + # overstrike all previous 'Failed' to indicate package is OK now 1.57 + sed -i "/>$1<\/a>/ s|\[ Failed \]|[ -Failed ]|" $activity 1.58 + fi 1.59 } 1.60 1.61