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-cache doesn't work #22

Closed
bkw777 opened this issue May 3, 2020 · 2 comments
Closed

--clean-cache doesn't work #22

bkw777 opened this issue May 3, 2020 · 2 comments
Assignees

Comments

@bkw777
Copy link
Owner

bkw777 commented May 3, 2020

bkw@negre:~/src/mainline$ mainline --clean-cache
mainline v1.0.6
E: Error creating directory /tmp/mainline/CnLmbwrH: Permission denied
E: Failed to create dir: /tmp/mainline/CnLmbwrH
Distribution: Ubuntu 19.10
Architecture: amd64
Running kernel: 5.6.7-050607-generic
Kernel version: 5.6.7-050607-generic
Cache: /home/bkw/.cache/mainline
Temp: /home/bkw/.temp/mainline/BK5nHwIi
bkw@negre:~/src/mainline$ du -sh ~/.cache/
2.8G    /home/bkw/.cache/
bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/
700M    /home/bkw/.cache/mainline/
bkw@negre:~/src/mainline$ du -sh ~/.cache/mainline/*
70M     /home/bkw/.cache/mainline/v5.5.13
70M     /home/bkw/.cache/mainline/v5.5.4
70M     /home/bkw/.cache/mainline/v5.5.6
70M     /home/bkw/.cache/mainline/v5.5.7
70M     /home/bkw/.cache/mainline/v5.5.8
71M     /home/bkw/.cache/mainline/v5.6.1
71M     /home/bkw/.cache/mainline/v5.6.2
71M     /home/bkw/.cache/mainline/v5.6.4
71M     /home/bkw/.cache/mainline/v5.6.5
71M     /home/bkw/.cache/mainline/v5.6.7
bkw@negre:~/src/mainline$
@bkw777 bkw777 self-assigned this May 3, 2020
@bkw777
Copy link
Owner Author

bkw777 commented May 4, 2020

I have partially half-assed not-really-but-kinda adressed this in a way in 1.0.7, by just not saving downloaded .deb packages any more. The temp dirs and cache dirs are still stupid and b0rken, but at least now they are 15M of stupid and b0rken instead of 3G of stupid and b0rken.

I'm leaving the issue open because it's still boken, just less harmful.

I am thinking that the whole cache idea was silly in the first place. I don't think it saves the user any network traffic.

What do you all think about having it just download the indexes and debs to temp every time? No persistent cache, and no more of this weird problem where root ends up creating fies in a non-root home dir which the user then can't delete. All downloads would be to tmp, and would be done as the user, and the only command run as root would be dpkg itself.

It should be simpler to write and work more reliably, but it might be slower or cause more downloading. I'm not sure. I also think it might result in exactly the same amount of downloading. Maybe I'll just try it in a branch and see what we see.

@bkw777
Copy link
Owner Author

bkw777 commented May 7, 2020

I think this is ok now. Might need one final manual sudo mainline --clean-cache, but I don't think it creates new bad dirs/files any more.

@bkw777 bkw777 closed this as completed May 7, 2020
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

1 participant