feat(flatpak): let the user choose which installation to act on
The same application can be present twice — in the user installation and system-wide, or from two remotes or two branches — and flatpak then refuses to act on the application id alone: "Multiple installed refs match 'com.hoptodesk.HopToDesk'". Removing either copy was impossible from the app. A row now stands for the application and carries the copies it is made of, so the details panel lists them and Remove opens one checkbox per copy; the provider gets back the exact target it listed, and naming a ref plus its installation is what makes the call unambiguous. Update gains the same resolution, since it hit the very same refusal, and removing one copy of two no longer takes the other one's launcher entry away with it. The listing that feeds it now asks flatpak for the ref, the branch and the installation, and reads those columns by position: a branch installed from a subdirectory has no version, and dropping that empty column shifted every field after it.
This commit is contained in:
14 files changed
+559
-20
No files matched your search
@@ -53,6 +53,14 @@ public:
|
||||
static std::string installFileCommand(FileKind kind, const std::string& path,
|
||||
bool userScope = false);
|
||||
|
||||
// Commands that act on exactly one installation of an application. Both take
|
||||
// either an application id — flatpak then refuses it when several copies
|
||||
// exist — or a target ("user:com.example.App/x86_64/stable") naming one copy,
|
||||
// as found in PackageInfo::instances. Exposed so the exact command line is
|
||||
// testable without running flatpak.
|
||||
static std::string uninstallCommand(const std::string& packageName);
|
||||
static std::string updateCommand(const std::string& packageName);
|
||||
|
||||
// Name a `.flatpakrepo` is registered under: its base name without the
|
||||
// extension (flathub.flatpakrepo -> flathub), which is what the user then
|
||||
// types in `flatpak install <name> <app>`.
|
||||
|
||||
Reference in new issue
Block a user