r3465 - jhalfs/trunk/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Aug 15 10:04:38 PDT 2007


Author: manuel
Date: 2007-08-15 11:04:38 -0600 (Wed, 15 Aug 2007)
New Revision: 3465

Modified:
   jhalfs/trunk/common/makefile-functions
Log:
Actually fixed the race condition.

Modified: jhalfs/trunk/common/makefile-functions
===================================================================
--- jhalfs/trunk/common/makefile-functions	2007-08-15 16:27:56 UTC (rev 3464)
+++ jhalfs/trunk/common/makefile-functions	2007-08-15 17:04:38 UTC (rev 3465)
@@ -64,17 +64,21 @@
 define remove_existing_dirs
   @PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \
   ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \
-  [ -n "$$ROOT" ] && [ -d $(SRCSDIR)/$$ROOT ] && \
-  rm -rf $(SRCSDIR)/$$ROOT && \
-  rm -rf $(SRCSDIR)/$${ROOT%-*}-build
+  [ -n "$$ROOT" ] && \
+  if [ -d $(SRCDIR)/$$ROOT ]; then \
+    rm -rf $(SRCSDIR)/$$ROOT && \
+    rm -rf $(SRCSDIR)/$${ROOT%-*}-build; \
+  fi;
 endef
 
 define remove_existing_dirs2
   @PKG_PATH=`ls -t $(SRC)/$(1) | head -n1` && \
   ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \
-  [ -n "$$ROOT" ] && [ -d $(SRC)/$$ROOT ] && \
-  rm -rf $(SRC)/$$ROOT && \
-  rm -rf $(SRC)/$${ROOT%-*}-build
+  [ -n "$$ROOT" ] && \
+  if [ -d $(SRC)/$$ROOT ]; then \
+    rm -rf $(SRC)/$$ROOT && \
+    rm -rf $(SRC)/$${ROOT%-*}-build; \
+  fi;
 endef
 
 #==#




More information about the alfs-log mailing list