Skip to contentSkip to conversation

configure: Force-remove temp dir

PATCH In review Dan Church 2 participants 2 messages Nov 13, 2020

lore
Share & tools
lore

Dan Church

author
#0 lore raw

PATCH 1/1 configure: Force-remove temp dir

Sometimes the compiler will leave a write-protected .o file in the temp directory, and GNU rm will ask before deleting it unless -f is specified.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 4cef321d9d..663b91a334 100755
@@ -7080,4 +7080,4 @@ done
 echo ' "$@"' >>config.status
 chmod +x config.status
 
-rm -r "$TMPDIR1"
+rm -rf "$TMPDIR1"
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Dan Church

Sometimes the compiler will leave a write-protected .o file in the temp directory, and GNU rm will ask before deleting it unless -f is specified.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 4cef321d9d..663b91a334 100755

configure done · line 7083

Quoted 5 lines
configure +1 -1
@@ -7080,4 +7080,4 @@ done
 echo ' "$@"' >>config.status
 chmod +x config.status
 
-rm -r "$TMPDIR1"
+rm -rf "$TMPDIR1"

We rm -rf this directory at the top of configure, so it seems like an oversight that we don't use '-f' here at the bottom too.

You should probably look into why your compiler is generating write-protected .o files, though -- that doesn't sound normal.

thanks
-- PMM