conf/178065: [PATCH] _worldtmp can fail sometimes if WORLDTMP/LIB32TMP is chflag'ed
Garrett Cooper
yaneurabeya at gmail.com
Tue Apr 23 03:00:01 UTC 2013
>Number: 178065
>Category: conf
>Synopsis: [PATCH] _worldtmp can fail sometimes if WORLDTMP/LIB32TMP is chflag'ed
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 23 03:00:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013 gcooper at gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO amd64
>Description:
In the event that make libraries fails and ${MAKEOBJDIRPREFIX} != /usr/obj and NO_CLEAN is not set, the build can fail to nuke ${WORLDTMP} and/or ${LIB32TMP} nigh immediately. This patch addresses those issues by following the same pattern that cleanworld employs in .../Makefile .
>How-To-Repeat:
See above comments.
>Fix:
Patch attached with submission follows:
>From 6c2f1c4cb7aa053910c70b8b49c9a1643a309ef4 Mon Sep 17 00:00:00 2001
From: Garrett Cooper <yanegomi at gmail.com>
Date: Mon, 22 Apr 2013 17:15:51 -0700
Subject: [PATCH 1/3] Nuke chflags on LIB32TMP and WORLDTMP
Sometimes these directories can be chflag'ed noschg, which means that
the rm -rf will fail immediately; just unchflag the entire directory
like cleanworld does today.
Signed-off-by: Garrett Cooper <yanegomi at gmail.com>
---
Makefile.inc1 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 4ce189c..27e0d1b 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -422,10 +422,18 @@ _worldtmp:
@echo ">>> Rebuilding the temporary build tree"
@echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN)
+.if exists(${WORLDTMP}/)
+ -rm -rf ${WORLDTMP}
+ -chflags -R 0 ${WORLDTMP}
rm -rf ${WORLDTMP}
+.endif
.if defined(LIB32TMP)
+.if exists(${LIB32TMP}/)
+ -rm -rf ${LIB32TMP}
+ -chflags -R 0 ${LIB32TMP}
rm -rf ${LIB32TMP}
.endif
+.endif
.else
rm -rf ${WORLDTMP}/legacy/usr/include
# XXX - These three can depend on any header file.
--
1.8.2
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list