faan11 / flatpak-compose

Define your flatpak applications and permissions
MIT License
7 stars 2 forks source link

[export-state] ignore apps with unknown repo #1

Closed RichardFevrier closed 5 months ago

RichardFevrier commented 6 months ago

Hi, using export-state can result of having some apps with an unknown repo, for example if you install a flatpak from a local file. Those apps should be ignored during the export (with a message to the user that they had been) otherwise using the apply will result of a failure. Comparing the repo value with every entry of flatpak remotes should be sufficient.

Great tool btw 🤩

Edit: I thought about it more; what happens if an app had been removed from the repo. Is the tool capable to continue the rest of the apply and warn the user about the failure?

faan11 commented 5 months ago

Hi Richard,

Thank you. I did not though about these edge case scenario. As you suggested i think it's a good idea to just warn the user if these kind of situations occur. In detail, the first scenario should be solved by your pull request ( i need to review that ). The latter scenario (if the application does not exists anymore in the store) flatpak should says that. Flatpak compose prints the standard error of flatpak application. https://github.com/faan11/flatpak-compose/blob/main/internal/view/execdiffcommandstate.go#L45