cookutils rev 521 slitaz-tank

cook: Add --flavors option back in to pkgdb option. Also added add stand alone flavors option so you don't need to rebuild package list to rebuild the flavor files.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Aug 15 22:21:53 2012 +0000 (2012-08-15)
parents 6ffcfca5ad36
children b9412d979c1e
files cook
line diff
     1.1 --- a/cook	Wed Aug 08 10:53:57 2012 +0000
     1.2 +++ b/cook	Wed Aug 15 22:21:53 2012 +0000
     1.3 @@ -1482,6 +1482,40 @@
     1.4  		# as well as flavors files for TazLiTo. We dont need logs since we do it
     1.5  		# manually to ensure everything is fine before syncing the mirror.
     1.6  		pkgdb "$2"
     1.7 +		if [ "$3" == "--flavors" ]; then
     1.8 +			cook flavors
     1.9 +		fi
    1.10 +		exit 0 ;;
    1.11 +	flavors)
    1.12 +		[ -d "$flavors" ] && echo -e "Missing flavors: $flavors\n" && exit 1
    1.13 +		[ -d "$live" ] && || mkdir -p $live
    1.14 +		gettext "Creating flavors files in:"; echo " $live"
    1.15 +		echo "Cook pkgdb: Creating all flavors" | log
    1.16 +		separator
    1.17 +		gettext -e "Recharging lists to use latest packages...\n"
    1.18 +		tazpkg recharge >/dev/null 2>/dev/null
    1.19 +		
    1.20 +		if [ ! -f "$live/tazlito.conf" ]; then
    1.21 +			echo "Creating configuration file: tazlito.conf"
    1.22 +			cp /etc/tazlito/tazlito.conf $live
    1.23 +			sed -i "s|WORK_DIR=.*|WORK_DIR="$SLITAZ"|g" $live/tazlito.conf
    1.24 +		fi
    1.25 +		
    1.26 +		#[ -d "$flavors/.hg" ] && $flavors && hg pull -u
    1.27 +		
    1.28 +		cd $live
    1.29 +		echo "Starting to generate flavors..."
    1.30 +		rm -f flavors.list *.flavor
    1.31 +		for i in $flavors/*
    1.32 +		do
    1.33 +			fl=$(basename $i)
    1.34 +			echo "Packing flavor: $(basename $i)"
    1.35 +			tazlito pack-flavor $fl >/dev/null || exit 1
    1.36 +			tazlito show-flavor $fl --brief --noheader 2> \
    1.37 +				/dev/null >> flavors.list
    1.38 +		done
    1.39 +		cp -f $live/*.flavor $live/flavors.list $PKGS
    1.40 +		separator && gettext "Flavors size: "; du -sh $live | awk '{print $1}'
    1.41  		exit 0 ;;
    1.42  	clean-chroot)
    1.43  		clean_chroot ;;