[gnome-hwtest] Fix up for the removal of the current symlink in OSTree



commit e09d7588aca990e475b86a5a62f7461aff19992b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Sep 25 18:47:37 2014 -0400

    Fix up for the removal of the current symlink in OSTree
    
    Use ostree admin --print-current-dir instead of looking for a current/
    symlink to find the current deployment directory.
    
    Use ostree admin instutil set-kargs rather than redeploying (which
    required figuring out the current checksum)

 src/gnome-hwtest-install |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-hwtest-install b/src/gnome-hwtest-install
index cc98db9..ebbe72c 100755
--- a/src/gnome-hwtest-install
+++ b/src/gnome-hwtest-install
@@ -189,9 +189,8 @@ function install_to_device() {
 
     echo 1>&2 "Installing bootloader on partition"
 
-    # Run 'ostree admin deploy' to fix up the bootloader config to have the correct root
-    ref=`readlink /ostree/deploy/gnome-continuous/current | sed 's deploy/\([0-9a-f]*\) * \1@'`
-    ostree admin --sysroot=/tmp/installroot deploy --karg=root=LABEL=hwt-$identifier-r --karg=quiet 
--karg=splash --os=gnome-continuous $ref
+    # Fix up the bootloader config to have the correct root
+    ostree admin --sysroot=/tmp/installroot instutil set-kargs --replace=root=LABEL=hwt-$identifier-r
 
     extlinux --install /tmp/installroot/boot
 
@@ -204,7 +203,8 @@ function install_to_device() {
 
     echo 1>&2 "Adjusting fstab"
 
-    fstab=/tmp/installroot/ostree/deploy/gnome-continuous/current/etc/fstab
+    curdir=`ostree admin --sysroot=/tmp/installroot --print-current-dir`
+    fstab=$curdir/etc/fstab
     sed "s/^LABEL=gnostree-boot/LABEL=hwt-$identifier-b/; s/^LABEL=gnostree-root/LABEL=hwt-$identifier-r/; 
s/^LABEL=gnostree-swap/#LABEL=gnostree-swap/;" \
         < $fstab > $fstab.new && mv $fstab.new $fstab
 


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