mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
fix: x86 Flatpak bundles are refused with a clear message instead of installing and failing to start (#1873)
This commit is contained in:
1 parent
8cf01ebb77
commit
6673a892e2
36 files changed
+133
-2
No files matched your search
@@ -141,10 +141,15 @@ def install_bundle(path):
|
||||
inst = installation()
|
||||
bundle = Gio.File.new_for_path(path)
|
||||
try:
|
||||
app_id = Flatpak.BundleRef.new(bundle).get_name()
|
||||
ref = Flatpak.BundleRef.new(bundle)
|
||||
app_id = ref.get_name()
|
||||
except GLib.Error as err:
|
||||
emit(e="error", message="%s is not a Flatpak bundle (%s)" % (os.path.basename(path), err.message))
|
||||
return 1
|
||||
if ref.get_arch() != Flatpak.get_default_arch():
|
||||
emit(e="error", code="arch", id=app_id, arch=ref.get_arch(),
|
||||
message="%s is built for %s, not %s" % (app_id, ref.get_arch(), Flatpak.get_default_arch()))
|
||||
return 1
|
||||
if app_ref(inst, app_id) is not None:
|
||||
emit(e="done", id=app_id, note="already installed")
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user