wok rev 22678

cookutils: do not break build env !
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 18 16:22:42 2020 +0100 (2020-01-18)
parents cb9350ef2c43
children 10cdf08515bb
files cookutils/receipt
line diff
     1.1 --- a/cookutils/receipt	Sat Jan 18 11:53:11 2020 +0100
     1.2 +++ b/cookutils/receipt	Sat Jan 18 16:22:42 2020 +0100
     1.3 @@ -26,6 +26,7 @@
     1.4  	sed -i 's|preinit core-4in1|preinit core-4in1 core-5in1|' cookiso
     1.5  	mkdir -p $DESTDIR/usr/bin $DESTDIR/etc/slitaz
     1.6  	make DESTDIR=$DESTDIR install
     1.7 +	sed -i 's|://mirror.switch.ch/ftp/mirror|s://ftp.gnu.org|' $DESTDIR/etc/slitaz/cook.conf
     1.8  }
     1.9  
    1.10  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.11 @@ -41,9 +42,17 @@
    1.12  }
    1.13  
    1.14  # Pre and post install commands for Tazpkg.
    1.15 +pre_install()
    1.16 +{
    1.17 +	cp $1/etc/slitaz/cook.conf $1/etc/slitaz/cook.conf.old 2> /dev/null
    1.18 +}
    1.19 +
    1.20  post_install()
    1.21  {
    1.22 -	case "$(cat "$1/etc/hostname" 2> /dev/null)" in
    1.23 +	MD5="$(sed '/^SETUP_MD5/!d;s|.*="\(.*\)".*|\1|' \
    1.24 +			$1/etc/slitaz/cook.conf.old)"
    1.25 +	sed -i "s|^SETUP_MD5=\"\"|SETUP_MD5=\"$MD5\"|" $1/etc/slitaz/cook.conf
    1.26 +	[ -z "$MD5" ] && case "$(cat "$1/etc/hostname" 2> /dev/null)" in
    1.27  	tank*)
    1.28  		if ! chroot "$1/" tazpkg list | grep -q aufs ; then
    1.29  			tazpkg get-install aufs --root="$1/"