Date: Tue, 8 Jun 2010 19:27:58 +0000 From: "b. f." <bf1783@googlemail.com> To: Giorgos Tsiapaliokas <terietor@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: can i use flags at once? Message-ID: <AANLkTim_mRNOeC4UelsqL6pmn_knxykt4lbCxrtNWIpq@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Just to clarify some of the earlier comments, the ports knobs that can be used to define certain build options are automatically persistent only if the knobs are defined as part of the OPTIONS framework, and if you don't subsequently delete the /var/db/port/*/options files, either directly or via the rmconfig target. You can reset the values of these knobs by re-running the config target. If you do that, it is usually best to run rmconfig first, because obsolete knobs aren't cleared by config, and can clutter up the options files, and thus your build environment. The first time you build a port, and every time thereafter that the available OPTIONS are changed for a port, you will be prompted to reconfigure, unless you set BATCH in your build environment, either directly or via switches in portmaster or portupgrade -- in which case a prior choice for a knob setting will be used, if you have made one, or the default value, if you have not. There are also some knobs that are _not_ OPTIONS, and so must be defined in the build environment each time the port is built/installed/packaged. These knobs are usually either knobs that were meant to be used for a lot of ports (e.g. WITHOUT_X11), or knobs from older ports that weren't converted to the OPTIONS framework, or experimental/maintainer knobs that the maintainer didn't want to expose for wider use. You can find these, for example, by visual inspection of the port Makefiles, by using sed/grep/awk on the port Makefiles, or by using something like the ports-mgmt/portsopt port. You can make these knobs persistent by using the ports-mgmt/portconf port, or the more complicated sysutils/penv port, or by adding them to pkgtools.conf(5) from the ports-mgmt/portupgrade* ports, or by adding them to some included makefile. /etc/make.conf exists partly for this purpose. But it is used for all invocations of make by default, even for the base system and for other software that is not in ports, so it is a good idea to limit the scope of your knob settings in this file by making the definitions conditional, in order to avoid polluting other builds. You can do this, for example, by using statements like: .if${.CURDIR:M*/usr/ports/*} #insert knobs for all ports here WITHOUT_FOO=yes .endif .if${.CURDIR:M*/usr/ports/devel/bar*} #insert knobs for the devel/bar port here WITHOUT_BAR_DEBUG=yes .endif or by using other makefile directives. (This assumes of course, that you haven't changed PORTSDIR to be something other than /usr/ports.) It usually takes some time and effort to determine which settings are best for you, for all of your ports, if you need to customize them -- so be patient. And if you really liked Portage, there is an experimental project to use Portage on FreeBSD (although I'm not sure whether this means stock FreeBSD, or a hybrid system with a FreeBSD kernel and GNU/LInux userland) that you may want to monitor: http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim_mRNOeC4UelsqL6pmn_knxykt4lbCxrtNWIpq>