# HG changeset patch # User Pascal Bellard # Date 1217236859 0 # Node ID be0dfeb8dc88d7f6a72198363380c047e9e75f15 # Parent d63ee20f29532c528274413db3d5fae4e84383c3 rename save-config to repack-config, add list-config, update tazpkgbox diff -r d63ee20f2953 -r be0dfeb8dc88 tazpkg --- a/tazpkg Sun Jul 27 11:17:50 2008 +0000 +++ b/tazpkg Mon Jul 28 09:20:59 2008 +0000 @@ -95,6 +95,7 @@ info Print information about a package. desc Print description of a package (if it exists). list-files List the files installed with a package. + list-config List the configuration files. search Search for a package by pattern or name (options: -i|-l|-m). search-file Search for file(s) in all installed packages files. install Install a local (*.tazpkg) package (--forced to force). @@ -104,7 +105,7 @@ pack Pack an unpacked or prepared package tree. recharge Recharge your packages.list from the mirror. repack Creates a package archive from an installed package. - save-config Creates a package archive with configuration files. + repack-config Creates a package archive with configuration files. upgrade Upgrade all installed and listed packages on the mirror. block|unblock Block an installed package version or unblock it for upgrade. get Download a package into the current directory. @@ -1112,7 +1113,19 @@ echo "$PACKAGE is extracted to : $DESTDIR" echo "" ;; - save-config) + list-config) + # List configuration files installed. + # + echo "" + echo -e "\033[1mConfiguration files" + echo "================================================================================" + for i in $INSTALLED/*/volatile.cpio.gz; do + zcat $i | cpio -t | grep -v "[0-9]* blocks" + done | sed 's|^|/|' | sort + echo "================================================================================" + echo "" + ;; + repack-config) # Create SliTaz package archive from configuration files. # mkdir -p $TMP_DIR && cd $TMP_DIR diff -r d63ee20f2953 -r be0dfeb8dc88 tazpkgbox --- a/tazpkgbox Sun Jul 27 11:17:50 2008 +0000 +++ b/tazpkgbox Mon Jul 28 09:20:59 2008 +0000 @@ -19,6 +19,20 @@ tazpkg >/dev/null fi +if [ "$1" == "call" ]; then + case "$2" in + list_config_files) + tazpkg list-config | awk ' +BEGIN { ls=0 } { + if (/^===/) ls=1-ls; + else if (ls) system("stat -c \"%A|%U|%G|%s|%n\" " $0); +}' + exit 0;; + *) echo "Invalid argument";; + esac + exit 1 +fi + # Tmp dir and files used to get pkgs infos on the fly. Clean also # list and search files to load less data and have a faster start. mkdir -p /tmp/tazpkgbox @@ -72,6 +86,24 @@ ' +export LIST_CONFIG_FILES=" + + + + 600160 + + $0 call list_config_files + + + + + + +" + # Main dialog export TAZPKG_DIALOG=' @@ -324,7 +356,7 @@ - + + +