ximion / appstream

Tools and libraries to work with AppStream metadata
http://www.freedesktop.org/wiki/Distributions/AppStream/
GNU Lesser General Public License v2.1
210 stars 115 forks source link

Add a way to allow custom entries when using compose #613

Closed tytan652 closed 7 months ago

tytan652 commented 7 months ago

appstreamcli compose does not seem to provide a way to not strip out custom entries.

For context, Flathub requires flathub::manifest custom entry for direct upload but the compose is done by flatpak−builder.

So maybe a way to add ASC_COMPOSE_FLAG_PROPAGATE_CUSTOM and a way to set the custom_allowed list would be nice addition.

ximion commented 7 months ago

Sure! Giving the CLI access to the whitelist shouldn't be difficult at all. It's funny, the compose command was originally just thought as a quick way to test catalog composition, and people were supposed to integrate the library in custom tooling instead (via scripts), and now the compose command instead is becoming the primary, fully-features entrypoint. I guess I should have seen that coming... :-P

GeorgesStavracas commented 7 months ago

There's no solution more persistent than a temporary solution :slightly_smiling_face:

ximion commented 7 months ago

There's no solution more persistent than a temporary solution 🙂

Indeed... :wink: With this change, you can now select which custom keys will show up in generated output data. If really needed, we could expand it in future to allow everything, but I guess for now this should cover all the usecases that have been raised :-)

Thanks for filing this issue!

GeorgesStavracas commented 7 months ago

Thanks @ximion, it was very kind of you to implement it!