[gnome-ostree] ostree-qemu-pull-deploy: Update to match ostree git



commit fbdc0aa27d1255b8cf74be8f50af8bfb8bec2410
Author: Colin Walters <walters verbum org>
Date:   Fri Dec 21 19:44:28 2012 -0500

    ostree-qemu-pull-deploy: Update to match ostree git

 src/ostbuild/ostbuild-qemu-pull-deploy |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/ostbuild-qemu-pull-deploy b/src/ostbuild/ostbuild-qemu-pull-deploy
index 346b38d..6bd1de2 100644
--- a/src/ostbuild/ostbuild-qemu-pull-deploy
+++ b/src/ostbuild/ostbuild-qemu-pull-deploy
@@ -21,8 +21,12 @@ set -x
 
 srcrepo=$1
 shift
+osname=$1
+shift
 target=$1
 shift
+
+test -n "$target" || (echo 1>&2 "usage: $0: SRCREPO OSNAME TARGET"; exit 1)
     
 qemu_path=ostree-qemu.img
 mountpoint=ostree-qemu-mnt
@@ -47,7 +51,9 @@ repopath=${ostreedir}/repo
 
 mount -o loop ${qemu_path} ${mountpoint}
 
+ostree admin --ostree-dir=${ostreedir} os-init ${osname} || (umount ${mountpoint} 2>/dev/null; exit 1)
 ostree --repo=${repopath} pull-local ${srcrepo} ${target} || (umount ${mountpoint} 2>/dev/null; exit 1)
-ostree admin --ostree-dir=${ostreedir} deploy --no-kernel ${target} || (umount ${mountpoint} 2>/dev/null; exit 1)
+ostree admin --ostree-dir=${ostreedir} deploy --no-kernel ${osname} ${target} || (umount ${mountpoint} 2>/dev/null; exit 1)
+ostree admin --ostree-dir=${ostreedir} prune ${osname} ${target} || (umount ${mountpoint} 2>/dev/null; exit 1)
 
 umount ${mountpoint}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]