download packages to different dirs for each build instances
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 10 Dec 2013 07:37:49 +0000 (15:37 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 3 Apr 2014 07:53:09 +0000 (15:53 +0800)
This patch can avoid download error during multiple build instance
runing at the same time

Change-Id: Ie2ae7b6e73c8f7c7358b4dfd8b758ec662db7bbd

init_buildsystem

index 512ba1f..e72613a 100755 (executable)
@@ -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()