when does make config-recursive decide what to include?

Hi,

when I run make config-recursive on a port such as security/strongswan, do ports not longer relevant due to an earlier choice get prompted for? ie. is the list of ports requiring configuration decided when the make command is run, or is it dynamically built as you select and deselect port options?

Many ports I build prompt for tens and tens of ports to configure, even though the depends list mentions none of them:

Code:
root@x:/usr/ports/security/strongswan # make build-depends-list
/usr/ports/ports-mgmt/pkg
/usr/ports/devel/pkgconf
/usr/ports/ftp/curl
root@x:/usr/ports/security/strongswan # make run-depends-list
/usr/ports/ftp/curl
root@x:/usr/ports/security/strongswan # make all-depends-list | wc -l
     780
root@x:/usr/ports/security/strongswan # pkg install strongswan
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        curl: 8.7.1
        indexinfo: 0.3.1
        libidn2: 2.3.7
        libnghttp2: 1.61.0
        libpsl: 0.21.5
        libssh2: 1.11.0_1,3
        libunistring: 1.2
        strongswan: 5.9.13_1

Number of packages to be installed: 8

The process will require 13 MiB more space.
4 MiB to be downloaded.

I thought the "all" list would be "build" + "depends". I also don't understand why pkg install doesn't make any of the make list output.

Thanks,
Scott
 
do ports not longer relevant due to an earlier choice get prompted for? ie. is the list of ports requiring configuration decided when the make command is run, or is it dynamically built as you select and deselect port options?
It goes through the list at the start. It doesn't re-read if you change options. If you want to configure the changed dependency chain you're going to need to keep running make config-recursive over and over until it stops showing option screens.
 
Thanks SirDice.

Ok I'm not going mad. Running make config-recursive forces you to configure a lot of ports that may never end up being required, depending on how you configure previous dependencies. Given that any sane person would agree that that is a bit stupid, how does one go about requesting a feature than re-assess dependencies as you go?

As to my other output, does anyone know why:
Code:
root@x:/usr/ports/security/strongswan # make build-depends-list
lists 3 ports, while:
Code:
root@x:/usr/ports/security/strongswan # make run-depends-list
lists 1 port, while:
Code:
root@x:/usr/ports/security/strongswan # make all-depends-list
lists 780 ports, while:
Code:
root@x:/usr/ports/security/strongswan # pkg install strongswan
lists 8 ports to be installed?

Thanks
 
Given that any sane person would agree that that is a bit stupid, how does one go about requesting a feature than re-assess dependencies as you go?
As far as I understood it it's not possible due to the way make(1) and Makefile work.

I've stopped using make config a long time ago. I simply set the options in /etc/make.conf and review those once in a while. It's also much easier to see which options you've set (or unset).

For example:
Code:
DEFAULT_VERSIONS+= mysql=10.11m samba=4.16 java=17 php=8.2 lua=54 ruby=3.2

OPTIONS_SET+= OPTIMIZED_CFLAGS

devel_cmake_UNSET= DOCS
devel_git_UNSET= GITWEB SEND_EMAIL
devel_py-molecule_SET= DOCKER
editors_neovim_SET= PYNVIM
java_openjdk11_UNSET= CUPS
math_gmp_SET= CPU_OPTS
net_samba413_SET= MDNSRESPONDER
net_samba413_UNSET= AD_DC AVAHI CUPS FRUIT
net_samba416_SET= MDNSRESPONDER
net_samba416_UNSET= AD_DC AVAHI CUPS FRUIT
print_ghostscript10_UNSET= CUPS
security_strongswan_SET= CURL GCM KDF SWANCTL VICI
security_sudo_SET= INSULTS
sysutils_cpupdate_SET= INTEL
sysutils_vm-bhyve_SET= BHYVE_FIRMWARE GRUB2_BHYVE
textproc_py-docutils_SET= PYGMENTS

I can probably remove the Samba 4.13 options now as the port itself has been removed. But you get the idea how this would work.

lists 780 ports, while:
Not entirely sure why this happens but I believe it's caused by pkgconf, it's the same when trying to use make install-missing-packages, it just blows up.
 
If you're trying to avoid having to enter through many config screens, consider using make BATCH=YES install clean. This will build using default config options or the options previously saved in /etc/make.conf or under /var/db/ports.

I normaly set config options for leaf ports only, then accept default dependencies with BATCH=YES. Should it not be okay (say, pulseaudio will be dragged in again), I'll find out which port did it and change config options accordingly. Saves a lot of time.
 
Back
Top