Skip to content

Fix recurring first-run update prompts on Mac - #432

Merged
scottjones merged 4 commits into
quattrofrom
fix/updater-login-loop
Sep 23, 2026
Merged

scottjones merged 4 commits into
quattrofrom
fix/updater-login-loop

Conversation

@malik-na

Copy link
Copy Markdown
Member

First-run setup retries at every graphical login when omarchy-settings omits omarchy-brightness-keyboard-auto.service, repeating the “Update System” notification even after an update.

Include the missing vendor service through the Mac package-build adaptation. Add migration 1789205735.sh to repair existing installs whose original migration completed with a dangling service link. Preserve custom wants entries and persistent/runtime masks, and keep actual service-operation failures retryable. New installs receive the service through the settings package and normal first-run enablement.

Regression coverage checks package contents, migration behavior, and first-run completion across repeated logins. The timezone notification argv correction is already in the base branch; distributing the matching desktop/settings package pair delivers both repairs.

Validation at bd1f2742b4dff9a14fe36d2d2243801b6622b158:

  • Focused first-run, timezone, keyboard package/migration, and original keyboard tests pass. Command metadata and syntax checks pass.
  • Unsigned aarch64 package archives built from the final source contain the exact service and migration bytes. A real pacman upgrade from the cached 4.0.2-2 pair to a validation 4.0.2-3 pair passed in a disposable root, preserving user data and migration markers. That transaction excluded dependencies, install scriptlets, and desktop hooks.
  • The actual migration runner passed missing-payload retry, restored-payload offline completion, and repeat-run checks.
  • ./test/all: CLI passes; 269 of 271 shell test files pass. Failures remain in network-qr-test.sh and settings-package-units-test.sh; this is not a clean full-suite result. ShellCheck was unavailable.

Native active-user-manager/ALS behavior, a live complete upgrade, physical fresh installation, and reboot remain unverified. These local package artifacts are validation builds, not a signed release.

@malik-na malik-na added the lvl 0 Core userspace: display, audio, video, graphics, memory, storage, battery, keyboard, network, BT. label Sep 18, 2026
@laihenyi

Copy link
Copy Markdown

Independent review (AI-assisted, Claude). I looked into why install.sh on Arch Linux ARM fails on this PR while the other checks are green.

Root cause of the CI failure

Since #435 landed on quattro, build-inputs/omarchy-first-run-packages.patch already adds the keyboard unit to the omarchy-settings and omarchy-settings-dev recipes, but inside a guard:

  if [[ -f default/systemd/user/omarchy-brightness-keyboard-auto.service ]]; then
    install -Dm644 default/systemd/user/omarchy-brightness-keyboard-auto.service "$pkgdir/usr/lib/systemd/user/omarchy-brightness-keyboard-auto.service"
  fi

ensure_keyboard_backlight_unit() in this PR first looks for the exact unguarded install -Dm644 … line (not present), then refuses because the unit name is present:

Error: omarchy-settings has an unfamiliar keyboard-unit installation; re-check /tmp/…/omarchy-settings/PKGBUILD

Reproduced locally: applying the overlay to pkgbuilds/omarchy-settings/PKGBUILD at the pinned 19ef4b5 and running the function on the result fails with that exact message. CI runs on the merge ref, so it sees the same combination.

Suggested resolution

The build-packages.sh part of this PR is now superseded by the overlay patch. Either drop ensure_keyboard_backlight_unit() and test/shell.d/keyboard-unit-package-test.sh (or repoint that test at the overlay), or make the function accept the guarded form. Dropping it seems simpler; the migration and the first-run coverage are the parts still needed.

Migration 1789205735.sh

Read through it and it holds up: only the original absolute package link is touched, custom links and regular files are preserved, persistent and runtime masks are respected, and the offline path (no user manager) only creates the link when nothing is there. One note: systemctl --user is-enabled prints disabled with exit 1, which the case handles; static, indirect and enabled-runtime return 0 and fall through to enable, which is fine for a unit with a [Install] section.

Local verification on quattro + this PR merged (Ubuntu 24.04 arm64 container)

  • Syntax loop and bin/omarchy commands --check (469 commands): pass
  • first-run-test.sh, brightness-keyboard-auto-test.sh, keyboard-unit-migration-test.sh, keyboard-unit-package-test.sh: all pass (the package test passes because it uses its own fixture PKGBUILD, which is why it did not catch the overlay interaction)

@malik-na malik-na added the US label Sep 20, 2026
@malik-na
malik-na requested a lite review from Copilot and removed request for dhh, ryanrhughes and wesleygrimes September 22, 2026 22:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@malik-na
malik-na requested a review from scottjones September 22, 2026 22:56

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Naeem, for tracking down the recurring first-run prompts, addressing the packaging interaction, and adding regression coverage for the repair!

Reviewed 5549750da0e1f0506e4734303093bc678d933bed; no blocking findings. The current adaptation accepts the actual pinned recipes and overlay. The new migration preserves custom service entries and masks, leaves failures retryable, and reaches users whose original migration was already marked complete.

Focused first-run, keyboard brightness, migration, and packaging tests passed, along with metadata and syntax checks. I also verified missing-payload retry, restored-payload offline completion, and repeat-run behavior through the actual migration runner in a temporary environment. The full local suite passed CLI and 295/296 shell test files; the sole failure was the known unrelated low-disk condition in the unchanged update-lock test. Hosted CI is green, including ARM installation. Live desktop service behavior was not exercised locally.

@scottjones
scottjones merged commit e77295a into quattro Sep 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lvl 0 Core userspace: display, audio, video, graphics, memory, storage, battery, keyboard, network, BT. US

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants