# HG changeset patch # User Aleksej Bobylev # Date 1445325892 -10800 # Node ID b6daeaa954319e13bc2427f2916be461fd7887f2 # Parent 8e696ea0016718dc545e8c3b30f8ad1a01328146 Fix working of modules/reconfigure (thank Robertux for bugreport); small changes. diff -r 8e696ea00167 -r b6daeaa95431 modules/getenv --- a/modules/getenv Mon Oct 19 08:24:32 2015 +0100 +++ b/modules/getenv Tue Oct 20 10:24:52 2015 +0300 @@ -24,7 +24,8 @@ debug() { if [ -n "$debug" ]; then colorize 036 "$@" >&2 - echo -e "$(date +%f) $@" >> "${LOG/.log/.debug}" + # $LOG is unavailable at the early stage on 'getenv' + [ -n "$LOG" ] && echo -e "$(date +%f) $@" >> "${LOG/.log/.debug}" fi } diff -r 8e696ea00167 -r b6daeaa95431 modules/reconfigure --- a/modules/reconfigure Mon Oct 19 08:24:32 2015 +0100 +++ b/modules/reconfigure Tue Oct 20 10:24:52 2015 +0300 @@ -23,7 +23,7 @@ if grep -q '^post_install()' "$INSTALLED/$PACKAGE/receipt"; then action 'Execute post-install commands...' tmp="$(mktemp)" - cp "$1" "$tmp" + cp "$INSTALLED/$PACKAGE/receipt" "$tmp" sed -i 's|$1/*$INSTALLED|$INSTALLED|g' "$tmp" ( . "$tmp"; post_install "$root" ) status diff -r 8e696ea00167 -r b6daeaa95431 modules/remove --- a/modules/remove Mon Oct 19 08:24:32 2015 +0100 +++ b/modules/remove Tue Oct 20 10:24:52 2015 +0300 @@ -133,13 +133,13 @@ [ $(grep "^$(echo $file | grepesc)$" "$INSTALLED/$mod/files.list" | wc -l) -gt 1 ] && \ continue 2 done - [ -n "$debug" ] && echo "remove_with_path $root$file" - remove_with_path $root$file + debug "remove_with_path ($root$file)" + remove_with_path "$root$file" done else for file in $(cat "$INSTALLED/$PACKAGE/files.list"); do - [ -n "$debug" ] && echo "remove_with_path $root$file" - remove_with_path $root$file + debug "remove_with_path ($root$file)" + remove_with_path "$root$file" done fi status @@ -190,7 +190,10 @@ if [ "$answer" -eq 0 ]; then for i in $REFRESH; do if [ "$(wc -l < "$INSTALLED/$i")" -gt 1 ]; then - _ 'Check %s for reinstallation' "$INSTALLED/$i" + _ 'Package "%s" was modified by "%s" and other packages. It will not be reinstalled.' \ + "${i%/modifiers}" "$PACKAGE" + _ 'Check "%s" for reinstallation.' "$INSTALLED/$i" + continue fi rm -r "$INSTALLED/$i"