rami3l / pacaptr

Pacman-like syntax wrapper for many package managers.

Home Page:https://crates.io/crates/pacaptr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Implement `--no-cache` option

gilescope opened this issue · comments

There’s a lot of random flags in package managers you have to set in docker to say please don’t cache this package which is important in docker to keep image sizes small.

Would be great to abstract this away behind a -no_cache flag or similar...

@gilescope Thanks a lot for your feedback!

I’m not quite sure what you’re trying to say though. Correct me if I’m wrong: you would like to have an option that resembles doing first -S and then -Scc, but all in one command?

If that is the case, I think it’s a nice idea, and it should be rather easy to implement
this feature. 🚀

PS: Just in case, as for now you also have a workaround by just passing the flag to apk for example, via pacaptr -S <pack> --no-confirm -- --no-cache.

PPS: Also, I understand that adding a prompt to package managers like apk might be problematical. So now we have the --no-confirm option to override that, and when I have time I’ll try to add config file support, after which you should be able to disable the prompt permanently if you don’t like it. 🤔

@gilescope I added a simple fix in ebb68f3, which reuses the --no-cache flag in apk, whereas in dpkg and brew I think it's fine to just do -S and then -Scc consecutively.

PS: I haven't used this program in docker yet, so I cannot really know if that's exactly what you wanted. If I have made a mistake somewhere, please point it out! 🚀

@gilescope Then this issue should be closed by ebb68f3. Feel free to comment if you encounter any problem.