Actually fixed the race condition.
This commit is contained in:
parent
1449dd2d0d
commit
3abe9d7e29
1 changed files with 10 additions and 6 deletions
|
@ -64,17 +64,21 @@ endef
|
||||||
define remove_existing_dirs
|
define remove_existing_dirs
|
||||||
@PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \
|
@PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \
|
||||||
ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \
|
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 && \
|
||||||
rm -rf $(SRCSDIR)/$${ROOT%-*}-build
|
rm -rf $(SRCSDIR)/$${ROOT%-*}-build; \
|
||||||
|
fi;
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define remove_existing_dirs2
|
define remove_existing_dirs2
|
||||||
@PKG_PATH=`ls -t $(SRC)/$(1) | head -n1` && \
|
@PKG_PATH=`ls -t $(SRC)/$(1) | head -n1` && \
|
||||||
ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \
|
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 && \
|
||||||
rm -rf $(SRC)/$${ROOT%-*}-build
|
rm -rf $(SRC)/$${ROOT%-*}-build; \
|
||||||
|
fi;
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#==#
|
#==#
|
||||||
|
|
Reference in a new issue