Actually fixed the race condition.

This commit is contained in:
Manuel Canales Esparcia 2007-08-15 17:04:38 +00:00
parent 1449dd2d0d
commit 3abe9d7e29

View file

@ -64,17 +64,21 @@ endef
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 ] && \
[ -n "$$ROOT" ] && \
if [ -d $(SRCDIR)/$$ROOT ]; then \
rm -rf $(SRCSDIR)/$$ROOT && \
rm -rf $(SRCSDIR)/$${ROOT%-*}-build
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 ] && \
[ -n "$$ROOT" ] && \
if [ -d $(SRC)/$$ROOT ]; then \
rm -rf $(SRC)/$$ROOT && \
rm -rf $(SRC)/$${ROOT%-*}-build
rm -rf $(SRC)/$${ROOT%-*}-build; \
fi;
endef
#==#