cookutils rev 951

Minor bug fixes due to the change in the behavior of the dot command in Busybox-1.27.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jul 27 13:36:30 2017 +0300 (2017-07-27)
parents db84a0fdf6f4
children c17ee46f8a4e
files cook cookall.sh data/cooklist data/receipt modules/pkgdb web/cooker.cgi web/cookiso.cgi
line diff
     1.1 --- a/cook	Sun Jul 23 12:35:12 2017 +0200
     1.2 +++ b/cook	Thu Jul 27 13:36:30 2017 +0300
     1.3 @@ -981,7 +981,7 @@
     1.4  	# Create files.list with redirecting find output.
     1.5  	action 'Creating the list of files...'
     1.6  	cd $fs
     1.7 -	find . -type f -print > ../files.list
     1.8 +	find . -type f -print >  ../files.list
     1.9  	find . -type l -print >> ../files.list
    1.10  	cd ..; sed -i 's|^.||' files.list
    1.11  	status
    1.12 @@ -1557,7 +1557,7 @@
    1.13  			for pkg in $(fgrep 'HOST_ARCH=' */receipt | egrep "$ARCH|any" | cut -d: -f1)
    1.14  			do
    1.15  				unset HOST_ARCH
    1.16 -				. $pkg
    1.17 +				. ./$pkg
    1.18  				count=$(($count + 1))
    1.19  				colorize 34 "$PACKAGE"
    1.20  			done
    1.21 @@ -1795,13 +1795,13 @@
    1.22  		count=0
    1.23  		title 'Checking for uncooked packages'
    1.24  
    1.25 -		for pkg in *; do
    1.26 +		for i in *; do
    1.27  			unset HOST_ARCH EXTRAVERSION
    1.28 -			[ ! -e $pkg/receipt ] && continue
    1.29 -			. $pkg/receipt
    1.30 +			[ ! -e $i/receipt ] && continue
    1.31 +			. ./$i/receipt
    1.32  			# Source cooked pkg receipt to get EXTRAVERSION
    1.33 -			if [ -d "$WOK/$pkg/taz" ]; then
    1.34 -				cd $WOK/$pkg/taz/$pkg-*
    1.35 +			if [ -d "$WOK/$i/taz" ]; then
    1.36 +				cd $WOK/$i/taz/$(ls $WOK/$i/taz/ | head -n1)
    1.37  				. ./receipt; cd $WOK
    1.38  			fi 
    1.39  			case "$ARCH" in
    1.40 @@ -1809,7 +1809,7 @@
    1.41  					debug "$(_ 'Package "%s"' "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg")"
    1.42  					if [ ! -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ]; then
    1.43  						count=$(($count + 1))
    1.44 -						colorize 34 "$pkg"
    1.45 +						colorize 34 "$i"
    1.46  					fi ;;
    1.47  				arm*)
    1.48  					# Check only packages included in arch
    1.49 @@ -1817,7 +1817,7 @@
    1.50  						# *.tazpkg
    1.51  						if [ ! -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg" ]; then
    1.52  							count=$(($count + 1))
    1.53 -							colorize 34 "$pkg"
    1.54 +							colorize 34 "$i"
    1.55  						fi
    1.56  					fi ;;
    1.57  			esac
     2.1 --- a/cookall.sh	Sun Jul 23 12:35:12 2017 +0200
     2.2 +++ b/cookall.sh	Thu Jul 27 13:36:30 2017 +0300
     2.3 @@ -8,7 +8,7 @@
     2.4  touch $DONELIST
     2.5  while true; do
     2.6  	chmod +x $DONELIST
     2.7 -	for i in $WOK/*/receipt ; do
     2.8 +	for i in $WOK/*/receipt; do
     2.9  		pkg=$(basename ${i%/receipt})
    2.10  		grep -q "^$pkg$" $DONELIST && continue
    2.11  		grep -q "^$pkg$" $CACHE/broken && continue
    2.12 @@ -16,16 +16,16 @@
    2.13  		HOST_ARCH="i486"
    2.14  		. $i
    2.15  		case " $HOST_ARCH " in
    2.16 -		*\ i486\ *|*\ any\ *);;
    2.17 -		*) continue;;
    2.18 +			*\ i486\ *|*\ any\ *);;
    2.19 +			*) continue;;
    2.20  		esac
    2.21 -		for j in $WANTED ; do
    2.22 +		for j in $WANTED; do
    2.23  			grep -q "^$j$" $DONELIST || continue 2
    2.24  			grep -q "^$j$" $CACHE/broken && continue 2
    2.25  		done
    2.26 -		for j in $BUILD_DEPENDS ; do
    2.27 +		for j in $BUILD_DEPENDS; do
    2.28  			case " $SLITAZ_TOOLCHAIN " in
    2.29 -			*\ $j\ *) continue ;;
    2.30 +				*\ $j\ *) continue;;
    2.31  			esac
    2.32  			grep -q "^$j$" $DONELIST || continue 2
    2.33  			grep -q "^$j$" $CACHE/broken && continue 2
    2.34 @@ -37,7 +37,7 @@
    2.35  	done
    2.36  	[ -x $DONELIST ] || continue
    2.37  	# try to break build dep loops...
    2.38 -	for pkg in gettext python udev cups libQtClucene menu-cache tzdata ; do
    2.39 +	for pkg in gettext python udev cups libQtClucene menu-cache tzdata; do
    2.40  		grep -q "^$pkg$" $DONELIST && continue
    2.41  		grep -q "^$pkg$" $CACHE/broken && continue
    2.42  		. $WOK/$pkg/receipt
    2.43 @@ -51,18 +51,18 @@
    2.44  
    2.45  TODOLIST=/tmp/todolist
    2.46  # list packages to build and their (build) dependancies
    2.47 -for i in $WOK/*/receipt ; do
    2.48 +for i in $WOK/*/receipt; do
    2.49  	grep -q "^$(basename ${i%/receipt})$" $DONELIST && continue
    2.50  	unset BUILD_DEPENDS WANTED
    2.51  	HOST_ARCH="i486"
    2.52  	. $i
    2.53  	case " $HOST_ARCH " in
    2.54 -	*\ i486\ *|*\ any\ *);;
    2.55 -	*) continue;;
    2.56 +		*\ i486\ *|*\ any\ *);;
    2.57 +		*) continue;;
    2.58  	esac
    2.59  	grep -q "^$PACKAGE$" $CACHE/broken && echo -n "broken/"
    2.60  	echo -n "$PACKAGE : "
    2.61 -	for j in $BUILD_DEPENDS $WANTED ; do
    2.62 +	for j in $BUILD_DEPENDS $WANTED; do
    2.63  		grep -q "^$j$" $DONELIST || echo -n "$j "
    2.64  		grep -q "^$j$" $CACHE/broken && echo -n "broken/$j "
    2.65  	done
     3.1 --- a/data/cooklist	Sun Jul 23 12:35:12 2017 +0200
     3.2 +++ b/data/cooklist	Thu Jul 27 13:36:30 2017 +0300
     3.3 @@ -5,8 +5,5 @@
     3.4  gcc
     3.5  make
     3.6  zlib
     3.7 -zlib-dev
     3.8  pcre
     3.9 -pcre-dev
    3.10  ncurses
    3.11 -ncurses-dev
     4.1 --- a/data/receipt	Sun Jul 23 12:35:12 2017 +0200
     4.2 +++ b/data/receipt	Thu Jul 27 13:36:30 2017 +0300
     4.3 @@ -1,4 +1,4 @@
     4.4 -# SliTaz package receipt.
     4.5 +# SliTaz package receipt v2.
     4.6  
     4.7  PACKAGE=""
     4.8  VERSION=""
     4.9 @@ -7,10 +7,10 @@
    4.10  MAINTAINER=""
    4.11  LICENSE=""
    4.12  WEB_SITE=""
    4.13 +
    4.14  TARBALL="$PACKAGE-$VERSION.tar.gz"
    4.15  WGET_URL="$TARBALL"
    4.16  
    4.17 -DEPENDS=""
    4.18  BUILD_DEPENDS=""
    4.19  
    4.20  # Rules to configure and make the package.
    4.21 @@ -22,5 +22,6 @@
    4.22  # Rules to gen a SliTaz package suitable for Tazpkg.
    4.23  genpkg_rules()
    4.24  {
    4.25 -	cp -a $install/* $fs
    4.26 +	copy @std @dev
    4.27 +	DEPENDS=""
    4.28  }
     5.1 --- a/modules/pkgdb	Sun Jul 23 12:35:12 2017 +0200
     5.2 +++ b/modules/pkgdb	Thu Jul 27 13:36:30 2017 +0300
     5.3 @@ -82,10 +82,10 @@
     5.4  		[ -e "$WOK/$i/taz/$j/description.txt" ] || continue
     5.5  
     5.6  		pkgname=$(. $WOK/$i/taz/$j/receipt; echo $PACKAGE)
     5.7 -		echo "$pkgname" >> descriptions.txt
     5.8 -		cat "$WOK/$i/taz/$j/description.txt" | sed 's|^$| |' >> descriptions.txt
     5.9 -		echo >> descriptions.txt
    5.10 -	done
    5.11 +		echo "$pkgname"
    5.12 +		sed 's|^$| |' "$WOK/$i/taz/$j/description.txt"
    5.13 +		echo
    5.14 +	done >> descriptions.txt
    5.15  done
    5.16  echo " ($(filesize $PKGS/descriptions.txt))" | dblog
    5.17  
    5.18 @@ -100,7 +100,7 @@
    5.19  		pack="$i/taz/$j"
    5.20  		[ -f "$WOK/$pack/receipt" ] || continue
    5.21  		unset_receipt
    5.22 -		. $pack/receipt
    5.23 +		. ./$pack/receipt
    5.24  
    5.25  		if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" -o \
    5.26  		     -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg" ]; then
     6.1 --- a/web/cooker.cgi	Sun Jul 23 12:35:12 2017 +0200
     6.2 +++ b/web/cooker.cgi	Thu Jul 27 13:36:30 2017 +0300
     6.3 @@ -226,9 +226,9 @@
     6.4  
     6.5  list_packages() {
     6.6  	cd $PKGS
     6.7 -	ls -1t *.tazpkg | head -n 20 | \
     6.8 +	ls -1t *.tazpkg | head -n20 | \
     6.9  	while read file; do
    6.10 -		echo -n $(TZ=UTC stat -c '%y' $PKGS/$file | cut -d . -f 1 | sed s/:[0-9]*$//)
    6.11 +		echo -n $(TZ=UTC stat -c '%y' $PKGS/$file | cut -d. -f1 | sed s/:[0-9]*$//)
    6.12  		echo " : $file"
    6.13  	done
    6.14  }
     7.1 --- a/web/cookiso.cgi	Sun Jul 23 12:35:12 2017 +0200
     7.2 +++ b/web/cookiso.cgi	Thu Jul 27 13:36:30 2017 +0300
     7.3 @@ -46,9 +46,9 @@
     7.4  
     7.5  list_isos() {
     7.6  	cd $iso
     7.7 -	ls -1t *.iso | head -6 | \
     7.8 +	ls -1t *.iso | head -n6 | \
     7.9  	while read file; do
    7.10 -		echo -n $(stat -c '%y' $file | cut -d . -f 1 | sed s/:[0-9]*$//)
    7.11 +		echo -n $(stat -c '%y' $file | cut -d. -f1 | sed s/:[0-9]*$//)
    7.12  		echo " : $file"
    7.13  	done
    7.14  }