Skip to content

Commit 7782349

Browse files
committed
feat(just): use uupd for system upgrades
We have a bit of an unideal situation currently as we are rather poorly re-implementing what uupd already handles in regards to rpm-ostree/bootc. What we want is to use bootc for upgrades when it is possible to use it. We currently don't do this as we just check for the `LockLayering` value in `rpm-ostreed.conf`. Users don't change this so this will always call to `rpm-ostree`. This recipe used to be shared with bluefin-lts which sets `LockLayering=True` because it doesn't support package layering. This also matches what automatic background updates are doing in this regard. Which might prevent bugs/confusion in the future. Bootc upgrade is slightly faster than rpm-ostree and more importantly does not mess with any RPMs or calls to any repos, which are all steps that might fail. There have also been bugs in the past in `rpm-ostree` that broke image updates [1]. Bootc is simpler and the likelihood seems to be lower for `upgrade` to straight up be broken. UUPD sadly doens't have "human output" as it wasn't really designed for this usecase so we need to do a little trickery there. 1 coreos/rpm-ostree#5567
1 parent 28529d0 commit 7782349

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

system_files/shared/usr/share/ublue-os/just/update.just

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ update:
1414
echo "automatic updates are currently running, use \`journalctl -fexu $SERVICE\` to see logs"
1515
exit 1
1616
fi
17-
if command -v rpm-ostree >/dev/null 2>&1 && [ -f /etc/rpm-ostreed.conf ] && grep -q -E -e "^[[:space:]]*LockLayering[[:space:]]*=[[:space:]]*true([[:space:]]*(#.*)?)?$" /etc/rpm-ostreed.conf ; then
18-
sudo bootc upgrade
19-
else
20-
rpm-ostree upgrade
21-
fi
22-
# rpm-ostree used due to bootc upgrade not supporting local layered packages
17+
18+
# less bad than shell script nightmare to do the whole bootc/rpm-ostree dance
19+
pkexec uupd \
20+
--hw-check=false \
21+
--json \
22+
--disable-module-flatpak \
23+
--disable-module-brew \
24+
--disable-module-distrobox \
25+
| jq -r '[(.title, .msg, .description) | select(.)] | join(" ")'
26+
2327
# Updates system Flatpaks
2428
if flatpak remotes | grep -q system; then
2529
flatpak update -y

0 commit comments

Comments
 (0)