blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
22 stars 26 forks source link

feat(gnome-extensions): allow uninstalling system gnome extensions #207

Closed alexispurslane closed 1 month ago

alexispurslane commented 2 months ago

What the title says; create an uninstall list as well as an install one.

fiftydinar commented 2 months ago

Thanks for the contribution.

I think that uninstall is not needed right now, as just removing the extension from install entry will remove it from the image.

For the base images which ship extensions that user wants to remove, they are always shipped in RPM format at this moment, so user can simply use rpm-ostree module to remove it.

But if users would base on images which use gnome-extensions module in the future, than some uninstall step is necessary if user desires.

There are some issues with the PR, so I will review the problematic code one by one.

alexispurslane commented 2 months ago

But if users would base on images which use gnome-extensions module in the future, than some uninstall step is necessary if user desires.

This is precisely the use-case I had in mind. Also, symmetry helps with making these things intuitive imo.

There are some issues with the PR, so I will review the problematic code one by one.

i wasn't able to test it so I'm not surprised, ill happily make whatever changes are necessary!

xynydev commented 2 months ago

i wasn't able to test it so I'm not surprised, ill happily make whatever changes are necessary!

Testing can be done with the source: keyword in modules, if you get the builds running in your fork.

https://blue-build.org/reference/module/#source-optional

fiftydinar commented 2 months ago

Good idea to make uninstallation step more reliable is to read metadata.json from already installed extension & than gather the information from following JSON keys:

YAML array key for uninstallation in recipe could be manually supplied extension UUID (which is also available in metadata.json). We would need to instruct the users on how to get those.

So when UUID is supplied, those steps are happening:

Voila, that's it.

Thanks to the tight standardization of Gnome extensions, it is possible to reliably remove them.

Note in README that uninstallation should be used only when extension is installed through gnome-extensions module in the base image. Otherwise, uninstallation through system package manager is preferred, to assure clean uninstallation.

fiftydinar commented 2 months ago

If you wish, I can start work on this instead of you, in case you find working on this PR overwhelming.

alexispurslane commented 2 months ago

If you wish, I can start work on this instead of you, in case you find working on this PR overwhelming.

Sorry! I do mean to get around to it, but I have to juggle a disability, a part time job, and a game engine project, so it might be a bit.

fiftydinar commented 1 month ago

Hello @alexispurslane, I have great news.

With the gnome-extensions rewrite that is merged yesterday, there is no need for this PR anymore!

Along with support for uninstalling gnome-extensions, config is much clearer with literal name of extensions as a module entry format & latest compatible extension version is always downloaded, taking into account the current Gnome version of the image.