# HG changeset patch # User Christophe Lincoln # Date 1235600998 -3600 # Node ID 99ede412a318e24913240ab19b7d3dae17a07273 # Parent 03db9118cc759ef399efafc759791b8e2fe9aeae Add command 'check-list' to show packages list updates diff -r 03db9118cc75 -r 99ede412a318 tazlito --- a/tazlito Sat Jan 31 12:22:56 2009 +0000 +++ b/tazlito Wed Feb 25 23:29:58 2009 +0100 @@ -7,7 +7,7 @@ # and/or a new ISO. Most commands must be run by root, except the stats # and the configuration file manipulation. # -# (C) 2007-2008 SliTaz - GNU General Public License. +# (C) 2007-2009 SliTaz - GNU General Public License. # # Authors : Christophe Lincoln # Pascal Bellard @@ -83,6 +83,7 @@ gen-liveflavor Generate a live-CD description from current system. show-flavor Show live-CD description. get-flavor Get a flavor's list of packages. + check-list Check a distro-packages.list for updates. extract-distro Extract an ISO to a directory and rebuild LiveCD tree. gen-distro Generated a Live distro and ISO from a list of packages. clean-distro Remove all files generated by gen-distro. @@ -714,6 +715,25 @@ rm -Rf $TMP_DIR fi ;; + check-list) + # Use current packages list in $PWD by default. + DISTRO_PKGS_LIST=distro-packages.list + [ -d "$2" ] && DISTRO_PKGS_LIST=$2/distro-packages.list + [ -f "$2" ] && DISTRO_PKGS_LIST=$2 + [ ! -f $DISTRO_PKGS_LIST ] && echo "No packages list found." && exit 0 + echo "" + echo -e "\033[1mLiveCD packages list check\033[0m" + echo "================================================================================" + for pkg in `cat $DISTRO_PKGS_LIST` + do + if ! grep -q "$pkg" /var/lib/tazpkg/packages.list; then + echo "Update: $pkg" + up=$(($up + 1)) + fi + done + [ -z $up ] && echo -e "List is up-to-date\n" && exit 0 + echo "================================================================================" + echo -e "Updates: $up\n" ;; gen-distro) # Generate a live distro tree with a set of packages. #