void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
821 stars 124 forks source link

`xbps-install --session`: Allow for temporary package installations #462

Closed OoLunar closed 2 years ago

OoLunar commented 2 years ago

Occasionally you need to temporarily install a package to test or debug software. Such package could include nmap, netstat (from net-tools or bash tools such as lswh. For those who are restricted on disk storage, having to uninstall packages afterwards is tedious.

And so I come with this proposal: The --session parameter. When installing a package with the session parameter, xbps copies the package name into a temporary file which is later used in runit stage 3 (when the system is shutting down) to uninstall the package. If the system turns off without any warning (such as sudden power loss), when the next xbps-install process runs, it checks and removes any previous temporary packages.

The only concerns would be leftover configs or generated files.

Vaelatern commented 2 years ago

I think you can do this in a shell script wrapping xbps. I do not see the need to have it included in the core software.

Duncaen commented 2 years ago

Yea this is not going to be something that is being added to xbps, you can already install packages with xbps-install -A to mark them automatically installed so that they are being removed when you run xbps-remove -o. Something like https://github.com/void-linux/xbps/issues/428 is more likely, but not some random session concept.