# HG changeset patch # User Eric Joseph-Alexandre # Date 1370798223 -7200 # Node ID 6c238fb48662099d2798709093886530f2169cc8 # Parent d3e9a97c762c4c2dda5c2ee8d4007d6cb91d5166 tazlito: Add include support in package list diff -r d3e9a97c762c -r 6c238fb48662 tazlito --- a/tazlito Sat Jun 08 19:25:48 2013 +0200 +++ b/tazlito Sun Jun 09 19:17:03 2013 +0200 @@ -12,7 +12,7 @@ # Authors : Christophe Lincoln # Pascal Bellard # -VERSION=5.1 +VERSION=5.2 . /lib/libtaz.sh @@ -1608,9 +1608,22 @@ if [ -s $FLAVORS_REPOSITORY/$FLAVOR/receipt ]; then cp $FLAVORS_REPOSITORY/$FLAVOR/receipt $TMP_DIR/$FLAVOR.receipt fi - - [ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ] && - get_pkglist $FLAVOR > $TMP_DIR/$FLAVOR.pkglist + + # Build the package list. + # + # On peut inclure une liste venant d'une autre saveur avec le mot clé @include + if [ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ]; then + INCLUDE=$(grep '^@include' $FLAVORS_REPOSITORY/$FLAVOR/packages.list) + if [ ! -z "$INCLUDE" ]; then + INCLUDE=${INCLUDE#@include } + [ -s "$FLAVORS_REPOSITORY/$INCLUDE/packages.list" ] && \ + get_pkglist $INCLUDE > $TMP_DIR/$FLAVOR.pkglist || \ + echo -e "\nERROR: Can't find include package listfrom $INCLUDE\n" + fi + # Genrate the finale/initiale package list + [ -s $FLAVORS_REPOSITORY/$FLAVOR/packages.list ] && \ + get_pkglist $FLAVOR >> $TMP_DIR/$FLAVOR.pkglist + fi if grep -q ^ROOTFS_SELECTION \ $FLAVORS_REPOSITORY/$FLAVOR/receipt; then . $FLAVORS_REPOSITORY/$FLAVOR/receipt