fix(flatpak): per-user install fallback and real error reporting

Installing through a system-wide remote fails under polkit and, when a
remote exists in both installations, flatpak refuses non-interactive
installs ("Multiple remotes have refs matching"). Retry with an explicit
`--user flathub` target, refresh appstream metadata before giving up on
stale refs, and let update/refresh fall back to the user installation as
well. Expose the last command output through IPackageManager::lastError
and show it in a dialog on failure instead of failing silently.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
BlackAngelTV committed 2026-08-29 13:57:03 +02:00
1 parent 5cc85cac4a
commit 6aef549eb0
7 files changed
+144 -15

No files matched your search

+5
View File
@@ -143,6 +143,11 @@ public:
// Whether privileged operations need a password (e.g. sudo for pacman).
// Providers that run per-user (e.g. flatpak) can keep the default.
virtual bool requiresPassword() const { return false; }
// Last error reported by the most recent failed operation, if any. Used
// to surface the real command output to the user instead of a generic
// failure message.
virtual std::string lastError() const { return {}; }
};