Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RequireRef to pull in target app of extension #5768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eeejay
Copy link
Contributor

@eeejay eeejay commented Apr 9, 2024

Also refactored op_get_runtime_ref a bit. If the extension needs to run an apply-extra script, and it specifies RequireRef, we don't need to pull in the runtime, just the ref because the ref will pull in the target's runtime as well.

Fixes #4566

@eeejay eeejay force-pushed the install-extension-app branch 2 times, most recently from b8abb14 to 59ea5bc Compare April 9, 2024 18:10
Also refactored op_get_runtime_ref a bit. If the extension needs to run
an apply-extra script, and it specifies RequireRef, we don't need to
pull in the runtime, just the ref because the ref will pull in the
target's runtime as well.

Fixes flatpak#4566
@hfiguiere
Copy link
Collaborator

I am still not convinced #4566 is an actual bug.

How does that work with org.freedesktop.LinuxAudio.Plugins.* ?

@eeejay
Copy link
Contributor Author

eeejay commented Apr 10, 2024

I am still not convinced #4566 is an actual bug.

How does that work with org.freedesktop.LinuxAudio.Plugins.* ?

It doesn't need to. Those kinds of extensions could still exist. This is an opt-in feature for extensions that require their target app. For example, installing a gimp plugin without gimp is not useful.

This isn't a breaking change, just another flag. Look at the included test.

@Mikenux
Copy link

Mikenux commented Apr 18, 2024

@eeejay:

What happens if this GIMP plugin is compatible with other apps than GIMP?

  • What is the user experience here in a terminal? (I don't have the environment to test)
  • Maybe check if an already installed app is able to use this plugin? But then what to do? Do not recommend GIMP or recommend it while saying that there is already an app that can use the plugin?

@andyholmes
Copy link

What happens if this GIMP plugin is compatible with other apps than GIMP?

It can be used by other applications without restriction.

What is the user experience here in a terminal? (I don't have the environment to test)

You install an extension and if it specifies a RequiredRef, then that is installed as a prerequisite.

Maybe check if an already installed app is able to use this plugin? But then what to do? Do not recommend GIMP or recommend it while saying that there is already an app that can use the plugin?

There's no need to check; an extension defines a RequiredRef when it requires a specific application to be useful.

If that's inappropriate for an extension because there is no single definitive requirement, then it should not opt-in for this behaviour.

@eeejay
Copy link
Contributor Author

eeejay commented Apr 18, 2024

@eeejay:

What happens if this GIMP plugin is compatible with other apps than GIMP?

The app that is pulled in is the one defined in ExtensionOf/ref. Could there be more than one?

Confusingly, the way to define the ref above is using the runtime entry in the builder manifest.

  • What is the user experience here in a terminal? (I don't have the environment to test)

It looks like a 2 step install where the app is installed before the extension. If the runtime is missing too, it's a 3 step install.

  • Maybe check if an already installed app is able to use this plugin? But then what to do? Do not recommend GIMP or recommend it while saying that there is already an app that can use the plugin?

I think the use case here are for 1:1 extensions that only have one supporting app. Like I said earlier, this is opt-in. The many-to-one extensions don't have use for this.

This kind of relationship already exists in the inverse context with the autodelete key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing an extension doesn't pull in its runtime
4 participants