cookutils diff cook @ rev 369
cook: dont update chroot if target host dont match build host
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 10 21:08:22 2012 +0200 (2012-05-10) |
parents | 897463926883 |
children | 2b84441caa17 |
line diff
1.1 --- a/cook Thu May 10 04:37:24 2012 +0200 1.2 +++ b/cook Thu May 10 21:08:22 2012 +0200 1.3 @@ -427,10 +427,12 @@ 1.4 set_paths 1.5 1.6 # Handle cross compilation. 1.7 - if [ "$HOST_ARCH" ] && [ ! $(echo "$HOST_ARCH" | fgrep $ARCH) ]; then 1.8 - echo "ERROR: This package dont cook or is not include in: $ARCH" 1.9 - [ "$CROSS_BUGS" ] && echo "Bug: $CROSS_BUGS" 1.10 - exit 1 1.11 + if [ "$HOST_ARCH" ]; then 1.12 + if ! echo "$HOST_ARCH" | fgrep -q $ARCH; then 1.13 + echo "ERROR: This package dont cook or is not include in: $ARCH" 1.14 + [ "$CROSS_BUGS" ] && echo "Bug: $CROSS_BUGS" 1.15 + exit 1 1.16 + fi 1.17 fi 1.18 case "$ARCH" in 1.19 arm|x86_64) 1.20 @@ -833,8 +835,10 @@ 1.21 fi 1.22 fi 1.23 1.24 + # Skip install if target host dont match build system. 1.25 + build=$(echo $BUILD_SYSTEM | cut -d "-" -f 1) 1.26 # Install package if part of the chroot to keep env up-to-date. 1.27 - if [ -d "$INSTALLED/$pkg" ]; then 1.28 + if [ -d "$INSTALLED/$pkg" ] && [ "$build" != "$ARCH" ]; then 1.29 . /etc/slitaz/cook.conf 1.30 . $WOK/$pkg/taz/$pkg-*/receipt 1.31 echo "Updating chroot environment..." 1.32 @@ -926,7 +930,7 @@ 1.33 # Setup fro cross ARM compiling. 1.34 sed -i \ 1.35 -e s'/ARCH=.*/ARCH="arm"/' \ 1.36 - -e s'/CFLAGS=.*/CFLAGS=""/' \ 1.37 + -e s'/CFLAGS=.*/CFLAGS="-march=armv6"/' \ 1.38 -e s'/BUILD_SYSTEM=.*/BUILD_SYSTEM=i486-slitaz-linux/' \ 1.39 -e s'/HOST_SYSTEM=.*/HOST_SYSTEM=$ARCH-slitaz-linux-gnueabi/' \ 1.40 /etc/slitaz/cook.conf 1.41 @@ -1246,8 +1250,11 @@ 1.42 fi 1.43 fi 1.44 1.45 + # Skip install if target host dont match build system. 1.46 + build=$(echo $BUILD_SYSTEM | cut -d "-" -f 1) 1.47 # Install package if part of the chroot to keep env up-to-date. 1.48 - if [ -d "$INSTALLED/$PACKAGE" ] && [ -z "$AUFS_MOUNTS" ]; then 1.49 + if [ -d "$INSTALLED/$PACKAGE" ] && [ -z "$AUFS_MOUNTS" ] && \ 1.50 + [ "$build" != "$ARCH" ]; then 1.51 echo "Updating chroot environment..." 1.52 echo "Updating chroot: $PACKAGE (${VERSION}${EXTRAVERSION})" | log 1.53 cd $PKGS && tazpkg install \