tazlito rev 317

tazlito: Add include support in package list
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Jun 09 19:17:03 2013 +0200 (2013-06-09)
parents d3e9a97c762c
children 9a94603ac754
files tazlito
line diff
     1.1 --- a/tazlito	Sat Jun 08 19:25:48 2013 +0200
     1.2 +++ b/tazlito	Sun Jun 09 19:17:03 2013 +0200
     1.3 @@ -12,7 +12,7 @@
     1.4  # Authors : Christophe Lincoln <pankso@slitaz.org>
     1.5  #           Pascal Bellard <pascal.bellard@slitaz.org>
     1.6  #
     1.7 -VERSION=5.1
     1.8 +VERSION=5.2
     1.9  
    1.10  . /lib/libtaz.sh
    1.11  
    1.12 @@ -1608,9 +1608,22 @@
    1.13  			if [ -s $FLAVORS_REPOSITORY/$FLAVOR/receipt ]; then
    1.14  				cp $FLAVORS_REPOSITORY/$FLAVOR/receipt $TMP_DIR/$FLAVOR.receipt
    1.15  			fi
    1.16 -			
    1.17 -			[ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ] &&
    1.18 -			get_pkglist $FLAVOR > $TMP_DIR/$FLAVOR.pkglist
    1.19 +
    1.20 +			# Build the package list.
    1.21 +			#
    1.22 +			# On peut inclure une liste venant d'une autre saveur avec le mot clé @include
    1.23 +			if [ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ]; then
    1.24 +				INCLUDE=$(grep '^@include' $FLAVORS_REPOSITORY/$FLAVOR/packages.list)
    1.25 +				if [ ! -z "$INCLUDE" ]; then
    1.26 +					INCLUDE=${INCLUDE#@include }
    1.27 +					[ -s "$FLAVORS_REPOSITORY/$INCLUDE/packages.list" ] && \
    1.28 +						get_pkglist $INCLUDE > $TMP_DIR/$FLAVOR.pkglist || \
    1.29 +						echo -e "\nERROR: Can't find include package listfrom $INCLUDE\n"
    1.30 +				fi
    1.31 +				# Genrate the finale/initiale package list 
    1.32 +				[ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ] && \
    1.33 +					get_pkglist $FLAVOR >> $TMP_DIR/$FLAVOR.pkglist
    1.34 +			fi
    1.35  			if grep -q ^ROOTFS_SELECTION \
    1.36  				$FLAVORS_REPOSITORY/$FLAVOR/receipt; then
    1.37  				. $FLAVORS_REPOSITORY/$FLAVOR/receipt