Suppressing config options

I'm trying to do some automated port installation. I'm finding that frequently make install results in a dialog box appearing which seems to ask me to add options or accept the defaults. I had a read through man ports and the handbook, and the only relevant idea I could find was to run make rmconfig, but I've tried this, and just get told there are no user-specified options configured.

I've worked out that I can manually seed /var/db/ports/myport/options, but this file explicitly warns that this should not be manually modified, and my sense of danger tells me this is the wrong approach.

What I want to be able to do is install a port (not a package), with default options, without any intervention. I'm figuring this must be possible, otherwise unattended mass port builds wouldn't be possible.

What should I do?
 
This one's documented in the ports(7) manpages. (You also might try searching the forums; I'm pretty sure this has come up before.)

Set the environment variable BATCH, a la:

$ export BATCH=yes

or

% setenv BATCH yes

For Bourne / C shells, respectively.
 
Ah perfect thanks.

For the record, the bourne shell (rather than bash / zsh) requires:

Code:
BATCH=yes
export BATCH

You can't do it in one go, iirc.
 
I think you should look into using a port manager pretty soon, because doing everything with 'make' will get tiresome. E.g. ports-mgmt/portmaster will move the config screens to the front, so once you get those out of the way you're set. Using BATCH will mean you cannot choose any ports options (which you may want).

There's also a switch to portmaster(8) to use BATCH, btw. (I believe it's -G). If you're happy with the flags and options you can place them in /usr/local/etc/portmaster.rc (template is in /usr/local/etc/portmaster.rc.sample).
 
Back
Top