3 Commits
Author SHA1 Message Date
Razze dec343a0ea user-data: Expose app data deletion in libflatpak
Applications using libflatpak currently have to duplicate the CLI's
private cleanup logic to offer the equivalent of uninstall --delete-data.

Add a standalone API that removes ~/.var/app data and resets permission
store entries without requiring the app to be installed. Keep it separate
from transactions so callers can retry partial failures or reset data for
an installed app.

Validate app IDs before constructing paths, propagate cancellation and
permission table errors, and document partial failure behavior.
2026-09-23 09:28:18 +00:00
Razze c4d953f088 user-data: Simplify delete result handling
Return the permission reset result directly after app data removal. This
keeps the success and error paths equivalent while removing an unnecessary
conditional.
2026-09-23 09:28:18 +00:00
Razze baf3d2f61c user-data: Move cleanup helpers into common
Libflatpak needs to reuse user-data deletion and permission reset logic
that was previously private to the command-line builtins. This will let
software stores offer the equivalent of uninstall --delete-data.

Move each concern into a separate common module without changing behavior
so a public API can be added in a later commit. Name the user-data module
and its helper consistently here, and keep them distinct from the
existing appdata metadata code.
2026-09-23 09:28:18 +00:00