#150 fedora-atomic.ks: create new ref and delete old on
Merged 7 years ago by kevin. Opened 7 years ago by jlebon.
jlebon/fedora-kickstarts pr/fix-refs  into  f25

file modified
+8
@@ -42,6 +42,14 @@ 

  # of this image to track the two week releases

  ostree admin set-origin --index 0 fedora-atomic https://kojipkgs.fedoraproject.org/atomic/25/ fedora-atomic/25/x86_64/docker-host

  

+ # Make sure the ref we're supposedly sitting on (according

+ # to the updated origin) exists.

+ ostree refs fedora-atomic:fedora-atomic/25/x86_64/updates/docker-host --create fedora-atomic:fedora-atomic/25/x86_64/docker-host

+ 

+ # Remove the old ref so that the commit eventually gets

+ # cleaned up.

+ ostree refs fedora-atomic:fedora-atomic/25/x86_64/updates/docker-host --delete

+ 

  # older versions of livecd-tools do not follow "rootpw --lock" line above

  # https://bugzilla.redhat.com/show_bug.cgi?id=964299

  passwd -l root

  1. Make sure that the ref we sit on exists. This will also work around
    a subtle issue which would cause static deltas to not be used (though
    https://github.com/ostreedev/ostree/pull/710 will fix that).
  2. Make sure we delete the old refs so that the commit eventually gets
    cleaned up.

rebased

7 years ago

LGTM - I'll test locally

It's tempting to implement this by doing a simple mv instead, e.g.

mv /ostree/repo/refs/remotes/fedora-atomic/fedora-atomic/25/x86_64/{updates/,}docker-host

Though using the ostree commands feel much more descriptive.

I'm ok with either...the mv is quick and clear, and not likely to break anytime soon.

Down the line I think the best fix here though is teaching Anaconda how do to this.

Also thinking about this, I'm pretty sure if we move the remote config into a package, which we need to do for other reasons - then this anaconda PR will come into play. And then I don't think any of this code will be necessary.

Pull-Request has been merged by kevin

7 years ago