# HG changeset patch # User Aleksej Bobylev # Date 1418610807 -7200 # Node ID 68b77b7f356cfe7756c5441adf901c0a3ba99084 # Parent 63fb1f016ece630acdc92cc8ad8b7189d08da639 tazpkg: backup "official" configuration files with "--newconf" anyway. diff -r 63fb1f016ece -r 68b77b7f356c tazpkg --- a/tazpkg Mon Dec 15 04:00:54 2014 +0200 +++ b/tazpkg Mon Dec 15 04:33:27 2014 +0200 @@ -785,7 +785,8 @@ if grep -q ^pre_install $ROOT$INSTALLED/$PACKAGE/receipt; then pre_install $ROOT fi - if [ -n "$CONFIG_FILES" ] && ! [ "$newconf" ]; then + + if [ -n "$CONFIG_FILES" ]; then # save 'official' configuration files action 'Saving configuration files...' for i in $CONFIG_FILES; do @@ -793,13 +794,15 @@ done | { cd fs ; cpio -o -H newc --quiet | gzip -9; cd ..; } > \ $ROOT$INSTALLED/$PACKAGE/volatile.cpio.gz - # keep user configuration files - for i in $CONFIG_FILES; do - { cd fs ; find ${i#/} -type f 2> /dev/null; cd ..; } - done | while read i; do - [ -e $ROOT/$i ] || continue - cp -a $ROOT/$i fs/$i - done + if [ -z "$newconf" ]; then + # keep user configuration files + for i in $CONFIG_FILES; do + { cd fs ; find ${i#/} -type f 2> /dev/null; cd ..; } + done | while read i; do + [ -e $ROOT/$i ] || continue + cp -a $ROOT/$i fs/$i + done + fi status fi