# Building from ports using default options



## balanga (Nov 4, 2019)

Sometimes when I build a port I need to go through dozens of dialog4ports options. Is here any way to accept all the defaults in advance and bypass all the dialog4ports options?


----------



## Lamia (Nov 4, 2019)

portmaster  -Bdy --no-confirm port_category/port_name

Th no confirm option is used with YES in this case among the two other options (delete old PKG & build dep).


----------



## SirDice (Nov 4, 2019)

```
BATCH             If defined, only operate on a port if it can be
                       installed 100% automatically.
```
From ports(7).


----------



## balanga (Nov 4, 2019)

SirDice said:


> ```
> BATCH             If defined, only operate on a port if it can be
> installed 100% automatically.
> ```
> From ports(7).



Can I set this globally in /etc/make.conf ? .... by specifying *BATCH* in that file?


----------



## SirDice (Nov 4, 2019)

If you're going with the defaults for everything why don't you save yourself a lot of time and just use the packages?


----------



## jardows (Nov 6, 2019)

SirDice said:


> If you're going with the defaults for everything why don't you save yourself a lot of time and just use the packages?


According to some information on the mailing lists, there appears to be an issue with drm-kmod package being built against 12.0 and not working with 12.1, requiring it to be built from ports.  There would not be much need to set options, but if you had not installed anything by ports before, all the build packages would prompt for configuration options.  It isn't a huge issue, but quite an annoyance.


----------



## SirDice (Nov 6, 2019)

jardows said:


> According to some information on the mailing lists, there appears to be an issue with drm-kmod package being built against 12.0 and not working with 12.1, requiring it to be built from ports.


You can, temporarily, switch to the release_1 repository, that's specifically for 12.1. The only 'downside' of release_1 is that it's based on latest, there's no quarterly branch for it.

The default package repositories (latest and quarterly) are still based on 12.0, they'll switch to 12.1 when 12.0 is EoL (three months from now). For 99% of the packages this is not a problem, kernel modules however are notoriously finicky when it comes to kernel changes.


----------



## PMc (Nov 6, 2019)

Use `make -D NO_DIALOG` in such cases. Or put `NO_DIALOG=yes` anywhere in the environment.


----------

