GNU bug report logs -
#39078
Path.pm change -> deltree.pl -> t/uninstall-fail failure
Previous Next
Reported by: Karl Berry <karl <at> freefriends.org>
Date: Sat, 11 Jan 2020 02:38:01 UTC
Severity: normal
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Regarding the new failure of Path.pm:rmtree to do removals, here is the
change I had in mind to use chmod and rm instead. The previously-"ERROR"
tests (uninstall-fail and instspc) work for me with this change.
Before I bother spending time on all the related overhead changes, any
objections, improvements, comments on this approach?
The rest of the patch is unrelated to the functional change: checking
for any of the elements existing after the purported removal. In my
testing I found it useful for this to be reported, and the abort to
occur, right away.
Then, the recursive ls report on failure might be overkill, but I found
it useful to understand the failing situation, so here it is for
consideration. (I guess it would be better to prepend the prefix to
every line of the ls output, which would be easy enough.) --thanks, karl.
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
index 57afc07..9312bbb 100644
--- a/t/ax/test-lib.sh
+++ b/t/ax/test-lib.sh
@@ -197,7 +197,18 @@ seq_ ()
rm_rf_ ()
{
test $# -gt 0 || return 0
- $PERL "$am_testaux_srcdir"/deltree.pl "$@"
+ chmod -R u+rwx "$@" || :
+ rm -rf "$@"
+ _am_rmrf_status=$?
+ for _am_rmrf_v
+ do
+ if test -e "$_am_rmrf_v"; then
+ echo "$me (test-lib.sh:rm_rf_): tree not removed: $_am_rmrf_v" >&2
+ echo "$me (test-lib.sh:rm_rf_): $(ls -alR $_am_rmrf_v 2>&1)" >&2
+ _am_rmrf_status=2
+ fi
+ done
+ return $_am_rmrf_status
}
commented_sed_unindent_prog='
This bug report was last modified 5 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.