From 6065772feca1862844efd6388b4782354154a6fc Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Tue, 25 Oct 2011 23:41:59 -0700 Subject: [PATCH 1/4] cache the images --- tools/build_kvm.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index 32c7bf6605..d804f423fa 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -284,6 +284,15 @@ if [ "$COPYENV" = "1" ]; then cp_it ~/.bashrc $ROOTFS/$DEST/.bashrc fi +# pre-cache uec images +for image_url in ${IMAGE_URLS//,/ }; do + IMAGE_FNAME=`basename "$image_url"` + if [ ! -f $IMAGES_DIR/$IMAGE_FNAME ]; then + wget -c $image_url -O $IMAGES_DIR/$IMAGE_FNAME + fi + cp $IMAGES_DIR/$IMAGE_FNAME $ROOTFS/$DEST/devstack/files/images +fi + # Configure the runner RUN_SH=$ROOTFS/$DEST/run.sh cat > $RUN_SH < Date: Tue, 25 Oct 2011 23:43:03 -0700 Subject: [PATCH 2/4] typo --- tools/build_kvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index d804f423fa..4ca1f1a6a1 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -291,7 +291,7 @@ for image_url in ${IMAGE_URLS//,/ }; do wget -c $image_url -O $IMAGES_DIR/$IMAGE_FNAME fi cp $IMAGES_DIR/$IMAGE_FNAME $ROOTFS/$DEST/devstack/files/images -fi +done # Configure the runner RUN_SH=$ROOTFS/$DEST/run.sh From 244655f0c57f5453b701c5e9c55608cea55b6a97 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Tue, 25 Oct 2011 23:48:39 -0700 Subject: [PATCH 3/4] copy to a directory not file --- tools/build_kvm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index 4ca1f1a6a1..3f32598bb4 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -290,6 +290,7 @@ for image_url in ${IMAGE_URLS//,/ }; do if [ ! -f $IMAGES_DIR/$IMAGE_FNAME ]; then wget -c $image_url -O $IMAGES_DIR/$IMAGE_FNAME fi + mkdir -p $ROOTFS/$DEST/devstack/files/images cp $IMAGES_DIR/$IMAGE_FNAME $ROOTFS/$DEST/devstack/files/images done From 00dcc067f7f4e2c2faaba9aeb3cc23a1981eaf12 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Tue, 25 Oct 2011 23:51:43 -0700 Subject: [PATCH 4/4] put them in the right place --- tools/build_kvm.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index 3f32598bb4..97260e2ae5 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -290,8 +290,7 @@ for image_url in ${IMAGE_URLS//,/ }; do if [ ! -f $IMAGES_DIR/$IMAGE_FNAME ]; then wget -c $image_url -O $IMAGES_DIR/$IMAGE_FNAME fi - mkdir -p $ROOTFS/$DEST/devstack/files/images - cp $IMAGES_DIR/$IMAGE_FNAME $ROOTFS/$DEST/devstack/files/images + cp $IMAGES_DIR/$IMAGE_FNAME $ROOTFS/$DEST/devstack/files done # Configure the runner