flatpak / flatpak

Linux application sandboxing and distribution framework
https://flatpak.org
GNU Lesser General Public License v2.1
4.16k stars 396 forks source link

Installing an extension doesn't pull in its runtime #4566

Open mwleeds opened 2 years ago

mwleeds commented 2 years ago
$ flatpak --version
1.12.2
$ flatpak install org.freedesktop.Sdk.Extension.ziglang//21.08
(follow prompts)
$ flatpak info -m org.freedesktop.Sdk.Extension.ziglang
[Runtime]
name=org.freedesktop.Sdk.Extension.ziglang
runtime=org.freedesktop.Sdk/x86_64/21.08
sdk=org.freedesktop.Sdk/x86_64/21.08

[ExtensionOf]
ref=runtime/org.freedesktop.Sdk/x86_64/21.08
runtime=org.freedesktop.Sdk/x86_64/21.08

[Build]
built-extensions=org.freedesktop.Sdk.Extension.ziglang.Sources;
$ flatpak run runtime/org.freedesktop.Sdk/x86_64/21.08
error: runtime/org.freedesktop.Sdk/x86_64/21.08 not installed

Perhaps installing an extension should pull in the runtime the extension depends on (taking into account --no-deps/--no-related) because otherwise the extension is pretty useless since you can't run it on its own right?

eeejay commented 4 months ago

Don't know if this is the same issue, but this would be helpful for app extensions too.

This seems wrong, since the GIMP app is not installed:

$ flatpak --user install flathub org.gimp.GIMP.Plugin.Lensfun//2-40
Looking for matches…

        ID                                Branch      Op      Remote      Download
 1. [✓] org.gimp.GIMP.Plugin.Lensfun      2-40        i       flathub     433.2 kB / 601.6 kB

Installation complete.

It should be pulling in org.gimp.GIMP as a dependency. If not by default, at least that should be an option in the add-extension section.

RokeJulianLockhart commented 4 months ago

https://github.com/flatpak/flatpak/issues/4566#issuecomment-2041322568

@eeejay, that is a slightly different issue, considering that this issue appears to specifically relate to runtimes. Either we should modify the title of this issue, or (probably better, for the short term, at least) report an issue for that references this one so that they're linked.

hfiguiere commented 4 months ago

Don't know if this is the same issue, but this would be helpful for app extensions too.

[...]

It should be pulling in org.gimp.GIMP as a dependency. If not by default, at least that should be an option in the add-extension section.

it's not a dependency at runtime. For example audio plugins can be used by any app that has the extension point.

The only relationship is that an application can request the extension to be autodownloaded and autoremove. The other is that flatpak, when you want to remove an extension, may tell you it's used by app xyz, like a runtime.

RokeJulianLockhart commented 4 months ago

https://github.com/flatpak/flatpak/issues/4566#issuecomment-2041473231

@hfiguiere, in which case, does flatpak support the concept of recommended packages, like https://discussion.fedoraproject.org/t/which-kind-of-dependencies-suggested-recommended-does-dnf-install/74111/2 and https://en.opensuse.org/SDB:Zypper_manual#COMMANDS:~:text=the%20package%0Aobsoletes.-,--recommends,-Show%20symbols%20the demonstrate? If so, then it should still be recommended, at least.