* [commit] Make build tree rm -rf'able again
@ 2013-11-13 0:16 Doug Evans
2013-11-13 9:58 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2013-11-13 0:16 UTC (permalink / raw)
To: gdb-patches
Hi.
It's nice if a build tree is rm -rf'able (without the extra effort of
a chmod -R u+w first).
I've done that since time immemorial so it feels like it
should continue to work.
[Certainly some random hacking could leave the tree in a state
where rm -rf doesn't work, but the default case of configure, build, test
has been rm -rf'able since as long as I can remember.]
Thus I've committed this.
2013-11-12 Doug Evans <dje@google.com>
* gdb.base/fileio.exp: Make $dir2 writable after the test is done
so that "rm -rf $builddir" Just Works.
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index b9dfb38..f77218f 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -253,5 +253,10 @@ gdb_test continue \
gdb_exit
+# Make dir2 writable again so rm -rf of a build tree Just Works.
+if {[file exists $dir2] && ![file writable $dir2]} {
+ system "chmod +w $dir2"
+}
+
set timeout $oldtimeout
return 0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [commit] Make build tree rm -rf'able again
2013-11-13 0:16 [commit] Make build tree rm -rf'able again Doug Evans
@ 2013-11-13 9:58 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2013-11-13 9:58 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
Doug Evans <dje@google.com> writes:
> +# Make dir2 writable again so rm -rf of a build tree Just Works.
> +if {[file exists $dir2] && ![file writable $dir2]} {
> + system "chmod +w $dir2"
No need to shell out, you can do that with file attributes -permissions.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-13 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 0:16 [commit] Make build tree rm -rf'able again Doug Evans
2013-11-13 9:58 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).