tazlito rev 417

tazlito: fix old busybox awk function: "%*x formats are not supported" (supported in current busybox 1.23.2); small fixes
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 14 00:56:29 2016 +0200 (2016-03-14)
parents 22eaf700fab5
children 0d0f417f54c7
files modules/calc_sizes tazlito
line diff
     1.1 --- a/modules/calc_sizes	Wed Feb 24 22:02:58 2016 +0200
     1.2 +++ b/modules/calc_sizes	Mon Mar 14 00:56:29 2016 +0200
     1.3 @@ -11,6 +11,8 @@
     1.4  # File $1/warn output: warnings about missing packages
     1.5  # TODO: use 'equivalent packages' rules
     1.6  
     1.7 +#tokens dir flavor outfile lsdir rootfs_p rootfs_u rootcd_u errfile warnfile root pkgdb loop undigest repos arr pi h2b h i b2h b p mark_deps pkg localdepend localdepends pkgs sizes depends size_u size_p boot_u boot_p num_pkgs size_packed size_unpacked size_iso s
     1.8 +
     1.9  BEGIN {
    1.10  	FS = "\t";
    1.11  	K = 1024; M = K * 1024; G = M * 1024;
    1.12 @@ -53,7 +55,7 @@
    1.13  				pi = pkgdb "/packages.info";
    1.14  			else
    1.15  				pi = pkgdb "/undigest/" repos[i] "/packages.info";
    1.16 -			if (!system("test -e "pi)) {
    1.17 +			if (!system("test -e " pi)) {
    1.18  				ARGV[ARGC] = pi;
    1.19  				ARGC ++;
    1.20  			}
    1.21 @@ -134,9 +136,9 @@
    1.22  
    1.23  	# Check critical packages: "syslinux" and one of the packages containing "vmlinuz*"
    1.24  	if (! pkgs["syslinux"]) printf "  * Syslinux\n" >> warnfile;
    1.25 -	if (! pkgs["linux"]       && ! pkgs["linux-without-modules"] && \
    1.26 -		! pkgs["linux64"]     && ! pkgs["linux64-without-modules"] && \
    1.27 -		! pkgs["linux-libre"] && ! pkgs["linux-libre-without-modules"] && \
    1.28 +	if (! pkgs["linux"]       && ! pkgs["linux-without-modules"] &&
    1.29 +		! pkgs["linux64"]     && ! pkgs["linux64-without-modules"] &&
    1.30 +		! pkgs["linux-libre"] && ! pkgs["linux-libre-without-modules"] &&
    1.31  		! pkgs["linux-uml"]) printf "  * Linux kernel\n" >> warnfile;
    1.32  
    1.33  	# Calculate unpacked and packed sizes of /boot
     2.1 --- a/tazlito	Wed Feb 24 22:02:58 2016 +0200
     2.2 +++ b/tazlito	Mon Mar 14 00:56:29 2016 +0200
     2.3 @@ -1356,10 +1356,9 @@
     2.4  
     2.5  	# Show list of mirrors
     2.6  	[ -f "$priority" ] && awk -vdb="$root$LOCALSTATE" '
     2.7 -	function show(num, name, url,   pad, len) {
     2.8 -		pad = "................................";
     2.9 -		len = (32 - length(name));
    2.10 -		printf " %-1.1d. %s%*.*s %-44.44s\n", num, name, len, len, pad, url;
    2.11 +	function show(num, name, url,   pad) {
    2.12 +		pad = substr("................................", 1, 32 - length(name));
    2.13 +		printf " %-1.1d. %s%s %-44.44s\n", num, name, pad, url;
    2.14  	}
    2.15  	{
    2.16  		num++;
    2.17 @@ -1372,7 +1371,7 @@
    2.18  		show(num, "main", url);
    2.19  	}' "$priority"
    2.20  
    2.21 -	tazpkg recharge --quiet
    2.22 +	tazpkg recharge --quiet >/dev/null
    2.23  }
    2.24  
    2.25  
    2.26 @@ -2176,6 +2175,7 @@
    2.27  		# Misc checks
    2.28  		mkdir -p "$PACKAGES_REPOSITORY"
    2.29  		REPACK=$(yesorno 'Repack packages from rootfs?' 'n')
    2.30 +		newline
    2.31  
    2.32  		# Mount CD-ROM to be able to repack boot-loader packages
    2.33  		if [ ! -e /boot -a -n "$CDROM" ]; then