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

Portal for housekeeping #42

Open
hanaral opened this issue May 25, 2021 · 2 comments
Open

Portal for housekeeping #42

hanaral opened this issue May 25, 2021 · 2 comments

Comments

@hanaral
Copy link

hanaral commented May 25, 2021

Problem

Currently housekeeping with flatpaks only effect trashed files, but that isn't the only thing housekeeping already has as a feature.

Proposal

Create a portal for the system to housekeep apps' cache and tmp files under their name in the ~/.var/app/ directory. The user and the system already have access to those files; I image that developers could have some kind of flag either in the .desktop (or elsewhere) saying that their app can be housekept by providing a location of temporary files.
Of course there is the obvious 'nuke cache folder' option (by completely emptying the pictured dir.), which could potentially be harmful, hence why it should be opt-in
スクリーンショット 2021-05-25 07 49 25

To be fair, I'm not sure if this even needs to be a portal - could't there be an OS component that manually removes these files that are flagged as 'housekeepable'?

Prior Art

スクリーンショット 2021-05-25 07 56 09

@danirabbit danirabbit transferred this issue from elementary/flatpak-platform Dec 4, 2021
@Marukesu
Copy link
Contributor

Marukesu commented Dec 4, 2021

I don't think what is beginning suggested here is a portal, portals are to allow the sandbox interact with the host, not the inverse.

What's beginning proposed here is a way to applications tell the host that "this folder should be cleanup automatically" and that don't need to be an portal.

Also, I don't think we need this, we could just recommend that flatpak applications set they TPMDIR to XDG_CACHE_DIR/tmp and we handle that with tmpfiles. we are doing that with downloads already.

@hanaral
Copy link
Author

hanaral commented Dec 5, 2021

I wasn't aware that temporary files could remain after the application is closed

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

No branches or pull requests

2 participants