Fix desktop update lifecycle and retain readable transaction progress
This commit is contained in:
parent
9666197252
commit
8156488850
2 changed files with 5 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ if [[ ! -f /etc/pacman.d/gnupg/trustdb.gpg ]]; then
|
|||
pacman-key --populate archlinux
|
||||
fi
|
||||
pacman -Syu --noconfirm --needed archiso ostree openssh sudo gptfdisk parted nano diffutils fakeroot file
|
||||
printf 'ARCHIPELAGO_PHASE\tcore\n'
|
||||
[[ ! -e /job/core && ! -e /job/iso-work ]] || { echo 'Use a fresh work directory for a new build'; exit 1; }
|
||||
mkdir -p /job/core /job/evidence /job/output
|
||||
cat > /job/package.sh <<'PACKAGE'
|
||||
|
|
@ -305,6 +306,7 @@ cat > /job/profile/airootfs/etc/systemd/system/serial-getty@ttyS0.service.d/auto
|
|||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin root --noclear %I 115200 linux
|
||||
EOF
|
||||
printf 'ARCHIPELAGO_PHASE\tiso\n'
|
||||
mkarchiso -v -w /job/iso-work -o /job/output /job/profile 2>&1 | tee /job/evidence/iso-build.log
|
||||
if grep -Ei 'error:|==> ERROR:' /job/evidence/iso-build.log; then
|
||||
echo 'Required live-image action failed; ISO candidate rejected' >&2; exit 1
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ cp /etc/pacman.d/mirrorlist "$stage/etc/pacman.d/mirrorlist"
|
|||
# before pacman enables the standard alpm download sandbox. Factory accounts are
|
||||
# restored below before capturing the Purpose payload.
|
||||
arch-chroot "$stage" systemd-sysusers
|
||||
printf 'ARCHIPELAGO_PHASE\tpackages\n'
|
||||
mapfile -t desktop_packages < /job/gnome-packages.txt
|
||||
mkdir -p "$stage/var/cache/pacman/pkg"
|
||||
# libalpm CheckSpace needs a mountpoint visible as / inside the chroot. Bind the
|
||||
|
|
@ -85,6 +86,7 @@ cp /job/core-base/usr/lib/archipelago/mkinitcpio-core.conf "$pkg/runtime/usr/lib
|
|||
@@GNOME_ASSETS@@
|
||||
rm "$pkg/runtime/usr/lib/archipelago/defaults/os-release" "$pkg/runtime/usr/lib/archipelago/mkinitcpio-core.conf"
|
||||
cp -a "$pkg/runtime/." "$stage/"
|
||||
printf 'ARCHIPELAGO_PHASE\tcompose\n'
|
||||
python /job/layer-delta.py capture /job/core-base "$stage" /job/purpose-layer
|
||||
purpose_layer=$(ostree --repo=/job/repo commit -b layers/purpose/desktop/gnome --tree=dir=/job/purpose-layer \
|
||||
--add-metadata-string=archipelago.snapshot="$snapshot")
|
||||
|
|
@ -93,6 +95,7 @@ printf '%s\n' "$purpose_layer" > /job/evidence/purpose-layer.commit
|
|||
# have both validated the payload. A failed copy must not destroy its source.
|
||||
ostree --repo=/job/repo checkout --force-copy "$purpose_layer" /job/purpose-input
|
||||
python /job/layer-delta.py compose /job/core-base /job/purpose-input /job/composed
|
||||
printf 'ARCHIPELAGO_PHASE\tfinalize\n'
|
||||
rm -rf /job/purpose-stage /job/purpose-layer /job/purpose-input
|
||||
# All work below operates on the composition, never the immutable input layers.
|
||||
mv /job/composed /job/core
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue