On Sun, Apr 17, 2016 at 8:57 PM, »Q« <boxc...@gmx.net> wrote: > I too often forget to use sudo along with emerge --ask, which gets me > a prompt to add --pretend to the options, e.g. > > $ emerge -a firefox > This action requires superuser access... > Would you like to add --pretend to options? [Yes/No] n > $ doh > Password: > > These are the packages that would be merged, in order: > > Calculating dependencies /... done! > > ( 'doh' is an alias for 'sudo $(history -p \!\!)' ) > > I never want to add --pretend to the options; if I've used --ask, > I also meant to use sudo. I've looked through the documentation and > couldn't find a way to stop emerge from prompting me about --pretend, > so now I'm asking you if I've overlooked a way. > >
Yes, the 'Would you like to add --pretend to options?' query does seem to be hard-coded. See below. portage-2.2.26/pym/_emerge/actions.py:2976,3004 # check if root user is the current user for the actions where emerge needs this ... uq = UserQuery(emerge_config.opts) if uq.query("Would you like to add --pretend to options?", "--ask-enter-invalid" in emerge_config.opts) == "No": ... I wonder if running the command line in the debug mode, 'emerge -ad firefox', would reveal anything of interest.