As many of you know Paludis has a
–resume-command-template option to save the resume command to a file.
In addition to that there’s the pretend-resume.hook which displays the resume command
or the file saved at the end of –pretend-install output.
The only missing thing is a way to quickly execute this command prepending with sudo.
I wrote a tiny zsh function, which I called plast,
to do the job. To use it, save the file somewhere in your $fpath and put
export PALUDIS_RESUME_DIR=/path/to/the/directory/where/you/save/your/paludis/resume/command/files autoload -U plast
in your .zshrc. You can use it like:
paludis -ip bla bla bla plast # executes the command in the newest resume file prepending with sudo