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

clear /var/cache/aura #692

Closed
leshow opened this issue Feb 8, 2021 · 10 comments · Fixed by #693
Closed

clear /var/cache/aura #692

leshow opened this issue Feb 8, 2021 · 10 comments · Fixed by #693

Comments

@leshow
Copy link
Contributor

leshow commented Feb 8, 2021

Was cleaning up some old packages on my system and removing from the package cache. I noticed I had a fairly large (5Gb) /var/cache/aura most of which is the vcs folder. Is there a good way to clear out this cache? I didn't notice any commands for it and aura -Sc doesn't do it.

@fosskers
Copy link
Owner

fosskers commented Feb 8, 2021

There isn't currently a command for it, but I can add one.

@fosskers fosskers closed this as completed Feb 8, 2021
@fosskers fosskers reopened this Feb 8, 2021
@fosskers
Copy link
Owner

fosskers commented Feb 8, 2021

Accidentally closed it.

@leshow
Copy link
Contributor Author

leshow commented Feb 8, 2021

Do you mind if I make an attempt? Do you have any thoughts on the behavior or implementation you'd like to see?

@fosskers
Copy link
Owner

fosskers commented Feb 8, 2021

I don't mind at all, rather I'd be quite happy for the contribution! Although do keep in mind that the Haskell version of Aura is currently being ported to Rust, so anything you add will also have to be ported. No issue there though, individual commands are pretty straight-forward to move over.

Either way, I'd expect this to be a subflag of -C that would operate on its own. That way your code could be added and operate independently. Perhaps just -C --vcs?

@leshow
Copy link
Contributor Author

leshow commented Feb 8, 2021

Oh interesting. As it happens I am also a full-time Rust developer so I'm happy to work on both.

As for behavior of the vcs subcommand, would it just clear out the directory by default? I assume the vcs subdir doesn't hold multiple versions of a single package?

@fosskers
Copy link
Owner

fosskers commented Feb 8, 2021

You should just be able to naively run a rm -rf * within that folder (or the equivalent Haskell function call).

@ratijas
Copy link
Contributor

ratijas commented Feb 9, 2021

Given that makepkg is one huge bash script, spawning rm -rf * is a particular directory literally makes sense. But there are always a bunch of 3rd-party libraries which do basically the same thing but with extra dependencies.

@leshow
Copy link
Contributor Author

leshow commented Feb 9, 2021

Why would we use an npm package to remove files? I'm just doing it in equivalent RIO function calls at the moment.

@ratijas
Copy link
Contributor

ratijas commented Feb 9, 2021

Of course I've never suggested to use an npm package. I was just mocking it. But irony doesn't really work well on the internet.

@fosskers
Copy link
Owner

fosskers commented Feb 9, 2021

I'm just doing it in equivalent RIO function calls at the moment.

That'll do nicely.

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

Successfully merging a pull request may close this issue.

3 participants