From: Zhang Qiang Date: Tue, 10 Dec 2013 07:37:49 +0000 (+0800) Subject: download packages to different dirs for each build instances X-Git-Tag: upstream/2015.01.15~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b3b78f0abef6ed0121063d609a0590b9a957f8b;p=tools%2Fbuild.git download packages to different dirs for each build instances This patch can avoid download error during multiple build instance runing at the same time Change-Id: Ie2ae7b6e73c8f7c7358b4dfd8b758ec662db7bbd --- diff --git a/init_buildsystem b/init_buildsystem index 512ba1f..e72613a 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -534,7 +534,7 @@ downloadpkg() cleanup_and_exit 1 fi - local destdir="$cachedir/tmp" + local destdir="$cachedir/tmp_$$" mkdir -p "$destdir" echo "downloading $url ... "; $BUILD_DIR/download "$destdir" "$url" || cleanup_and_exit 1 @@ -554,6 +554,7 @@ downloadpkg() ;; esac mv "$destfile" "$SRC" || cleanup_and_exit 1 + rm -rf $destdir } getcachedir()