Preserve port configuration

cahimira said:
Where is the custom config stored?
They are stored in /var/db/ports where you still need to use the right ports name of course. There you'll find a file options which contains this information.

But even more important, in my opinion, is where you could find this kind of information yourself. I'd like to point you to the ports(7) manual page which honestly is your swiss army knife to common (and sometimes not so common) ports questions.

In this case the PORT_DBDIR environment option gives it all away:

Directory where the results of configuring OPTIONS are stored. Defaults to /var/db/ports. Each port where OPTIONS have been configured will have a uniquely named sub-directory, containing a single file options.
"When in doubt about the Ports collection, check the Ports manual page first" (my own motto).

For the record: the only reason I'm writing it out as I do now is because I realize like no other how easy it is to overlook this. Truth be told I've been doing that myself the first weeks when I started using FreeBSD.
 
wblock@ said:
The user-selected options are stored in /var/db/ports/portname/options.

Close but it's actually /var/db/ports/${UNIQUENAME}/options. The difference is quite subtle. For example all the perl5.x ports share the same UNIQUENAME that is just perl.
 
More detail does not always make it clearer. Now we've introduced make(1) variables and notation. I said portname, meaning "the name of the port" and the italics indicating it's a user-replaced value, not PORTNAME the make(1) variable.
 
Back
Top