4

I have just upgraded from 10.3 to 11.1. The following page describes the recommended next steps

When I run portmaster -af I am continuously prompted for questions about what should be built for each package. How do I simple take the default selection for each one automatically? There is no way this process will ever complete otherwise.

GAD3R
  • 66,769

2 Answers2

9

portmaster -afdy --no-confirm


It's generally good practice to peruse the man page.

Specifically, this tidbit

--no-confirm

do not ask the user to confirm the list of ports to be installed and/or updated before proceeding

Unfortunately, , this is not always sufficient, especially if certain packages ask for a prompt independently.

There is another flag, -y that answers yes to all prompts, depending on the version of portmaster it may be there, but it is absent in the FreeBSD version of the man page.

But from the horses mouth

echo '-y answer yes to all user prompts for the features below'

This is actually quite common for interactive console applications across the *NIX world, so -y is usually worth a try.


Generically, in other situations, yes is a standard shell utility that will spam "yes", or any other string to a shell.

yes | portmaster -af

or

yes no | portmaster -af

to refuse everything.

crasic
  • 426
  • 1
    I'd also add -d to delete old distfiles. portmaster asks about these and don't account -y for it. – arrowd Aug 12 '17 at 07:15
1

To just assume "yes" to everything, temporally you may add to /etc/make.conf this:

BATCH=yes

see also this https://unix.stackexchange.com/a/5905/53084

nbari
  • 616