core: Associate branches with remotes, move trigger runs into checkout
Also add --atomic-retarget option to checkout. This does the magical symlink dance to do atomic swaps between trees.
This commit is contained in:
1 parent
3f23ac156a
commit
bae584c64a
22 files changed
+490
-164
No files matched your search
@@ -76,10 +76,10 @@ chmod a=rwxt tmp
|
||||
if ! test -d ostree; then
|
||||
mkdir -p ostree
|
||||
|
||||
$SRCDIR/ostree-setup.sh $(pwd)/ostree
|
||||
$SRCDIR/gnomeos-setup.sh $(pwd)/ostree
|
||||
fi
|
||||
|
||||
rsync -a -H -v ${WORKDIR}/repo ${WORKDIR}/current ${WORKDIR}/modules ${WORKDIR}/gnomeos-3.4-* ./ostree
|
||||
rsync -a -H -v ${WORKDIR}/repo ${WORKDIR}/current ${WORKDIR}/modules ${WORKDIR}/var ${WORKDIR}/gnomeos-3.4-* ./ostree
|
||||
|
||||
current_uname=$(uname -r)
|
||||
|
||||
|
||||
@@ -48,16 +48,15 @@ if ! test -d /ostree/repo/objects; then
|
||||
$SRCDIR/gnomeos-setup.sh /ostree
|
||||
fi
|
||||
|
||||
ostree --repo=repo remote add origin http://ostree.gnome.org/repo
|
||||
ostree-pull --repo=repo origin gnomeos-3.4-i686-runtime
|
||||
ostree-pull --repo=repo origin gnomeos-3.4-i686-devel
|
||||
ostree --repo=repo remote add origin http://ostree.gnome.org/repo ${BRANCH_PREFIX}{runtime,devel}
|
||||
ostree-pull --repo=repo origin
|
||||
for branch in runtime devel; do
|
||||
ostree --repo=repo checkout --atomic-retarget ${BRANCH_PREFIX}${branch}
|
||||
done
|
||||
ln -sf ${BRANCH_PREFIX}runtime current
|
||||
|
||||
uname=$(uname -r)
|
||||
|
||||
$SRCDIR/gnomeos-update-branches.sh
|
||||
|
||||
cd -
|
||||
|
||||
if test -d /etc/grub.d; then
|
||||
cp $SRCDIR/15_ostree /etc/grub.d/
|
||||
else
|
||||
@@ -74,7 +73,9 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -ar /lib/modules/${uname} /ostree/modules/${uname}
|
||||
if ! test -d /ostree/modules/${uname}; then
|
||||
cp -ar /lib/modules/${uname} /ostree/modules/${uname}
|
||||
fi
|
||||
|
||||
initrd_name=initramfs-ostree-${uname}.img
|
||||
if ! test -f "/boot/${initrd_name}"; then
|
||||
|
||||
@@ -26,13 +26,7 @@ BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
|
||||
test -d repo || exit 1
|
||||
|
||||
for branch in runtime devel; do
|
||||
rev=$(ostree --repo=$(pwd)/repo rev-parse ${BRANCH_PREFIX}${branch});
|
||||
if ! test -d ${BRANCH_PREFIX}${branch}-${rev}; then
|
||||
ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}
|
||||
ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}
|
||||
fi
|
||||
ln -sf ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current.new
|
||||
mv ${BRANCH_PREFIX}${branch}-current{.new,}
|
||||
ostree --repo=repo checkout --atomic-retarget ${BRANCH_PREFIX}${branch}
|
||||
done
|
||||
ln -sf ${BRANCH_PREFIX}runtime-current current.new
|
||||
mv current.new current
|
||||
Reference in new issue
Block a user