tazlito rev 92

Add command 'check-list' to show packages list updates
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 25 23:29:58 2009 +0100 (2009-02-25)
parents 03db9118cc75
children 31c1dadc0a0a
files tazlito
line diff
     1.1 --- a/tazlito	Sat Jan 31 12:22:56 2009 +0000
     1.2 +++ b/tazlito	Wed Feb 25 23:29:58 2009 +0100
     1.3 @@ -7,7 +7,7 @@
     1.4  # and/or a new ISO. Most commands must be run by root, except the stats
     1.5  # and the configuration file manipulation.
     1.6  #
     1.7 -# (C) 2007-2008 SliTaz - GNU General Public License.
     1.8 +# (C) 2007-2009 SliTaz - GNU General Public License.
     1.9  #
    1.10  # Authors : Christophe Lincoln <pankso@slitaz.org>
    1.11  #           Pascal Bellard <pascal.bellard@slitaz.org>
    1.12 @@ -83,6 +83,7 @@
    1.13    gen-liveflavor  Generate a live-CD description from current system.
    1.14    show-flavor     Show live-CD description.
    1.15    get-flavor      Get a flavor's list of packages.
    1.16 +  check-list      Check a distro-packages.list for updates.
    1.17    extract-distro  Extract an ISO to a directory and rebuild LiveCD tree.
    1.18    gen-distro      Generated a Live distro and ISO from a list of packages.
    1.19    clean-distro    Remove all files generated by gen-distro.
    1.20 @@ -714,6 +715,25 @@
    1.21  			rm -Rf $TMP_DIR
    1.22  		fi
    1.23  		;;
    1.24 +	check-list)
    1.25 +		# Use current packages list in $PWD by default.
    1.26 +		DISTRO_PKGS_LIST=distro-packages.list
    1.27 +		[ -d "$2" ] && DISTRO_PKGS_LIST=$2/distro-packages.list
    1.28 +		[ -f "$2" ] && DISTRO_PKGS_LIST=$2
    1.29 +		[ ! -f $DISTRO_PKGS_LIST ] && echo "No packages list found." && exit 0
    1.30 +		echo ""
    1.31 +		echo -e "\033[1mLiveCD packages list check\033[0m"
    1.32 +		echo "================================================================================"
    1.33 +		for pkg in `cat $DISTRO_PKGS_LIST`
    1.34 +		do
    1.35 +			if ! grep -q "$pkg" /var/lib/tazpkg/packages.list; then
    1.36 +				echo "Update: $pkg"
    1.37 +				up=$(($up + 1))
    1.38 +			fi
    1.39 +		done
    1.40 +		[ -z $up ] && echo -e "List is up-to-date\n" && exit 0
    1.41 +		echo "================================================================================"
    1.42 +		echo -e "Updates: $up\n" ;;
    1.43  	gen-distro)
    1.44  		# Generate a live distro tree with a set of packages.
    1.45  		#