Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ The same Alpine-based initramfs, with release differences:
| --- | --- |
| transcript (`script` to `/tmp/omarchy-update.log`) | kept; `omamobile-update` makes the pty itself, so one sudo timestamp covers the whole run |
| update lock, 10 GiB free-space check | kept |
| `omarchy-update-confirm` (gum) | replaced by the sheet's Update button, plus refusals: battery below 30% unless charging; `[omamobile]` not first or `[omarchy]` after Arch Linux ARM's repositories; another distribution's kernel, a bootloader, Snapper or fwupd package in the transaction; `linux-omamobile` when `omamobile-boot-update preflight` says its hook would refuse to write slot B |
| `omarchy-update-confirm` (gum) | replaced by the sheet's Update button, plus refusals: battery below 30% unless charging; `[omamobile]` not first or `[omarchy]` after Arch Linux ARM's repositories; another distribution's kernel, a bootloader, Snapper or fwupd package in the transaction; `linux-omamobile` when `omamobile-boot-update preflight` says its hook would refuse to write slot B; an update pacman can't plan (`pacman -Sup` fails, as with an unsatisfiable dependency), with pacman's reason |
| `omarchy-update-pkg-prune` (paccache) | kept |
| `omarchy-snapshot create` (Snapper, Limine's snapshot menu) | skipped: ext4 root, no Snapper (exit 127, which Omarchy takes for "Snapper absent") |
| stay-awake inhibitor | kept (the screen stays on during the update) |
Expand Down
20 changes: 14 additions & 6 deletions packages/omamobile-omarchy/bin/omamobile-update
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,23 @@ def pending_updates(offline=False):
db = os.environ.get("CHECKUPDATES_DB") or os.path.join(os.environ.get("TMPDIR") or "/tmp", "checkup-db-%d" % os.getuid())
targets = []
if lines:
# pacman's plan of the whole update: when it can't be made (a dependency
# no repository satisfies, a conflict), the update would stop in the
# middle, so refuse it here with pacman's own reason (#433)
try:
plan = subprocess.run([PACMAN, "-Sup", "--dbpath", db, "--logfile", "/dev/null",
"--print-format", "%n %v"], capture_output=True, text=True, timeout=120)
for l in plan.stdout.splitlines():
parts = l.split()
if len(parts) == 2 and not l.startswith(("::", "warning", "error")):
targets.append((parts[0], parts[1]))
except (OSError, subprocess.TimeoutExpired):
pass
except (OSError, subprocess.TimeoutExpired) as e:
return lines, [], "could not plan the update: %s" % e
if plan.returncode != 0:
why = [l.strip() for l in (plan.stderr + "\n" + plan.stdout).splitlines()
if l.strip().startswith(("error", "::"))]
return lines, [], "pacman can't plan this update, so it would stop partway: %s" % (
"; ".join(why[:4]) or "pacman -Sup exited %d" % plan.returncode)
for l in plan.stdout.splitlines():
parts = l.split()
if len(parts) == 2 and not l.startswith(("::", "warning", "error")):
targets.append((parts[0], parts[1]))
if not targets:
targets = [(l.split()[0], l.split()[-1]) for l in lines]
return lines, targets, ""
Expand Down
11 changes: 10 additions & 1 deletion packages/omamobile-omarchy/test/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cat >"$fake/pacman" <<EOF
#!/bin/bash
case "\$1" in
-Q) [[ \$2 == omarchy ]] && echo "omarchy 4.0.4-2" || exit 1 ;;
-Sup) cat "$t/plan" 2>/dev/null ;;
-Sup) if [[ -s "$t/plan-fail" ]]; then cat "$t/plan-fail" >&2; exit 1; fi; cat "$t/plan" 2>/dev/null ;;
-Qmq) echo some-aur-thing ;;
-Qtdq) echo orphan-lib ;;
*) echo "pacman \$*" >>"$calls" ;;
Expand Down Expand Up @@ -201,6 +201,15 @@ printf 'omarchy 4.0.5-1\nlinux-aarch64 7.3-1\nlimine 9.0-1\nlinux-firmware-other
out=$(python3 -I "$U" check --json)
ok "check: kernels and bootloaders in the plan block, firmware and headers don't" 'python3 -c "import json,sys; d=json.loads(sys.argv[1]); assert d[\"boot_packages\"] == [\"limine\", \"linux-aarch64\"] and not d[\"ok\"]" "$out"'
printf 'omarchy 4.0.5-1\nmesa 26.1-1\n' >"$t/plan"
# A plan pacman can't make (#433: [omarchy]'s aquamarine 0.15.1 without the so=15
# our Hyprland needs) is a refusal with pacman's reason, never the plain list
printf "error: failed to prepare transaction (could not satisfy dependencies)\n:: unable to satisfy dependency 'libaquamarine.so=15-64' required by hyprland\n" >"$t/plan-fail"
out=$(python3 -I "$U" check --json)
ok "check: a plan pacman can't make blocks, with pacman's reason" 'python3 -c "
import json,sys; d=json.loads(sys.argv[1]); b=\" \".join(d[\"blockers\"])
assert not d[\"ok\"] and \"can\x27t plan this update\" in b and \"libaquamarine.so=15-64\" in b, d[\"blockers\"]
" "$out"'
rm -f "$t/plan-fail"

# The phone's own kernel package goes through omamobile-boot-update
printf 'omarchy 4.0.5-1\nlinux-omamobile 7.3.0rc6.r453.g0123456789ab-1\nomamobile-boot-update 0.1.0-1\n' >"$t/plan"
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-omarchy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.33
0.1.34