cookutils rev 232

cook: dont use 'set -e' and set $kvers for compile_rules and genpkg_rules
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 27 08:45:01 2011 +0200 (2011-05-27)
parents ded5e8ac4850
children d59cb7bee773
files cook
line diff
     1.1 --- a/cook	Fri May 27 07:19:02 2011 +0200
     1.2 +++ b/cook	Fri May 27 08:45:01 2011 +0200
     1.3 @@ -173,6 +173,10 @@
     1.4  		install=$WOK/$WANTED/install
     1.5  		wanted_stuff=$WOK/$WANTED/stuff
     1.6  	fi
     1.7 +	# Kernel version is set from linux-api-headers since it part of toolchain.
     1.8 +	if [ -f "$INSTALLED/linux-api-headers/receipt" ]; then
     1.9 +		kvers=$(grep ^VERSION= $INSTALLED/linux-api-headers/receipt | cut -d '"' -f 2)
    1.10 +	fi
    1.11  	# Old way compatibility.
    1.12  	_pkg=$install
    1.13  }
    1.14 @@ -438,14 +442,9 @@
    1.15  	fi
    1.16  	unset free
    1.17  
    1.18 -	# Export flags and path to be used by make and receipt. Kernel version is
    1.19 -	# set from linux-api-headers since it part of toolchain and modules are
    1.20 -	# build with linux-module-headers wich is of course the same version.
    1.21 -	if [ -f "$INSTALLED/linux-api-headers/receipt" ]; then
    1.22 -		KVERS=$(grep ^VERSION= $INSTALLED/linux-api-headers/receipt | cut -d '"' -f 2)
    1.23 -	fi
    1.24 +	# Export flags and path to be used by make and receipt.
    1.25  	DESTDIR=$pkgdir/install
    1.26 -	export DESTDIR KVERS MAKEFLAGS CFLAGS CXXFLAGS CONFIG_SITE LC_ALL=C LANG=C
    1.27 +	export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS CONFIG_SITE LC_ALL=C LANG=C
    1.28  
    1.29  	# Check for build deps and handle implicit depends of *-dev packages
    1.30  	# (ex: libusb-dev :: libusb).
    1.31 @@ -607,9 +606,9 @@
    1.32  	separator
    1.33  	if grep -q ^genpkg_rules $receipt; then
    1.34  		gettext -e "Executing: genpkg_rules\n"
    1.35 -		cd $pkgdir
    1.36 -		mkdir -p $fs && ( set -e; genpkg_rules ) || echo -e \
    1.37 -			"\nERROR: genpkg_rules failed\n" >> $LOGS/$pkg.log
    1.38 +		cd $pkgdir && mkdir -p $fs
    1.39 +		genpkg_rules || echo -e "\nERROR: genpkg_rules failed\n" >> \
    1.40 +		$LOGS/$pkg.log
    1.41  	fi
    1.42  
    1.43  	# First QA check to stop now if genpkg_rules failed.
    1.44 @@ -642,7 +641,7 @@
    1.45  		[ -L "fs$file" ] && continue
    1.46  		[ -f "fs$file" ] || continue
    1.47  		case "$file" in
    1.48 -		/lib/modules/*/modules.*|*.pyc) continue;;
    1.49 +			/lib/modules/*/modules.*|*.pyc) continue ;;
    1.50  		esac
    1.51  		md5sum "fs$file" | sed 's/  fs/  /'
    1.52  	done < files.list > md5sum