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

Clean up scratch space and provide cleanup helper #177

Open
ckreibich opened this issue Jan 23, 2024 · 6 comments
Open

Clean up scratch space and provide cleanup helper #177

ckreibich opened this issue Jan 23, 2024 · 6 comments

Comments

@ckreibich
Copy link
Member

zkg generally does not clean up after itself when it puts stuff in its scratch directory. For users going through a lot of packages this can add up (since zkg may place a clone for each package in the scratch space). It would also be nice to add a cleanup function to tidy on demand, a bit like dnf clean / apt clean.

@ottobackwards
Copy link

How would one know what to clean? can this be expanded to have that information?
Or is it just scratch?

@bbannier
Copy link
Member

AFAICT the following directories under zkg's statedir do not contain information required at runtime:

  • clones
  • logs
  • scratch
  • testing

Even compiled plugins should be contained in plugin_dir so that removing any of the above dirs shouldn't e.g., cause debug symbols to become unavailable.

We might want to have separate cleanups for each directory, e.g.,

zkg prune [ --clones | --logs | --scratch | --testing | --all ]

@ottobackwards
Copy link

Is rebuild a consideration? Did that ever make it in?

@ottobackwards
Copy link

Would a good scope limitation be splitting automatic cleanup and explict commands into two different issues?

Also, would the commands be as @bbannier listed, for ALL things or for specific plugins?
IE>
zig prune [ --clones | --logs | --scratch | --testing | --all ] [plugin]

Would it be plugin@version? or the same specifier acceptance and the install command?

@bbannier
Copy link
Member

bbannier commented Apr 15, 2024

Is rebuild a consideration? Did that ever make it in?

That's #38. I believe we would refetch in that case anyway and the stuff mentioned above would be pure leftovers.

Would it be plugin@version? or the same specifier acceptance and the install command?

IMO these should be global, not package-specific (mirroring what e.g., apt/dnf mentioned in the original issue do), but maybe @ckreibich has other ideas.

@ottobackwards
Copy link

@ckreibich ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants