tazlito rev 460

tazlito: pass /etc/slitaz-release to the rootfs too; add option --stripped to consider packages list already stripped.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Sep 08 14:14:08 2017 +0300 (2017-09-08)
parents c6ab9a100548
children f399e0ab8101
files tazlito
line diff
     1.1 --- a/tazlito	Sat Aug 26 12:05:06 2017 +0300
     1.2 +++ b/tazlito	Fri Sep 08 14:14:08 2017 +0300
     1.3 @@ -1476,6 +1476,11 @@
     1.4  # Strip versions from packages list
     1.5  
     1.6  strip_versions() {
     1.7 +	if [ -n "$stripped" ]; then
     1.8 +		action 'Consider list %s already stripped' "$(basename "$1")"
     1.9 +		status
    1.10 +		return 0
    1.11 +	fi
    1.12  	action 'Strip versions from list %s...' "$(basename "$1")"
    1.13  	local in_list="$1" tmp_list="$(mktemp)" namever pkg
    1.14  	[ -f "$in_list" ] || die "List '$in_list' not found."
    1.15 @@ -1531,6 +1536,7 @@
    1.16  	tazpkg --root=$rootfs >/dev/null 2>&1
    1.17  	# pass current 'mirror' to the rootfs
    1.18  	cp -f /var/lib/tazpkg/mirror $rootfs/var/lib/tazpkg/mirror
    1.19 +	cp -f /etc/slitaz-release    $rootfs/etc/slitaz-release
    1.20  	# link rootfs packages cache to the regular packages cache
    1.21  	rm -r "$rootfs/var/cache/tazpkg"
    1.22  	ln -s /var/cache/tazpkg "$rootfs/var/cache/tazpkg"
    1.23 @@ -2277,6 +2283,7 @@
    1.24  		# pass current 'mirror' to the root
    1.25  		mkdir -p $root/var/lib/tazpkg
    1.26  		cp -f /var/lib/tazpkg/mirror $root/var/lib/tazpkg/mirror
    1.27 +		cp -f /etc/slitaz-release    $root/etc/slitaz-release
    1.28  		strip_versions "$LIST_NAME"
    1.29  
    1.30  		if [ "$REPACK" == 'y' ]; then