You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f492398
Browse filesBrowse the repository at this point in the historyBrowse files
fix(update): decide from how the app was installed, not from one file's existence (#575)
Closes#354, #571.
The check was `Path::new("/usr/bin/rpm-ostree").exists()`, which answers a
narrower question than the one being asked and gets the important case
backwards.
Inside a Flatpak sandbox the host's /usr is not visible. A Flatpak on
Silverblue therefore sees no rpm-ostree binary, reports itself as an ordinary
install, and is offered an auto-update its runtime will not let it apply. The
opposite mistake is available too: plenty of ordinary Fedora systems have the
rpm-ostree binary installed without being OSTree-booted, and were told to use
a manual command they do not need.
get_platform_info replaces it, returning how the app was installed and on
what architecture:
Flatpak /.flatpak-info, or FLATPAK_ID
Snap SNAP
AppImage APPIMAGE
RpmOstree /run/ostree-booted — whether the host booted from an OSTree,
rather than whether a binary happens to be present
Standard none of the above
Sandboxes are tested first and deliberately: inside one, the host's markers
are either invisible or not ours to act on.
Only Standard and AppImage may update themselves. Flatpak, Snap and OSTree
all have a runtime that owns the installed files, and each now gets its own
command and a sentence saying why the app is not doing it. The rpm-ostree URL
uses the running architecture — an aarch64 machine was handed an x86_64
download.
A detection failure means "do not offer to update", which is the safe
direction: an update the app cannot apply is worse than one it does not
offer.
The decision is a pure function over a probe trait, so each packaging is
tested without arranging the real thing — I cannot produce a Flatpak sandbox
or an OSTree host here, and would rather say so than imply the detection has
been exercised in the wild. What is verified is that the rules are the ones
intended, including the Flatpak-on-OSTree case that motivated this.
Seven Rust tests, six on the channel policy. The status bar's diagnostic blob
now reports the install type rather than a yes/no for rpm-ostree.
Also: the Path import was Linux-only, because the old check was. The probe
reads paths on every target, so it is unconditional now — left as it was,
this would have compiled here and failed on the macOS and Windows release
builds.
Co-authored-by: Claude Opus 5 <[email protected]>
0 commit comments