Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2017 16:12:58 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        "Morse, Richard E.,MGH" <REMORSE@mgh.harvard.edu>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: Configuring options/knobs without `make config`
Message-ID:  <CAN6yY1snZchKucCgAR44LB_M-LDPF5gfqkinTXMYw=Vq8UMggg@mail.gmail.com>
In-Reply-To: <9D4E0A60-FBAA-43A2-81C5-4CE9C7C90353@mgh.harvard.edu>
References:  <9D4E0A60-FBAA-43A2-81C5-4CE9C7C90353@mgh.harvard.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 27, 2017 at 7:36 AM, Morse, Richard E.,MGH <
REMORSE@mgh.harvard.edu> wrote:

> Hi! I=E2=80=99m trying to document the setup of a new system, and I=E2=80=
=99m finding it
> really complicated to document exactly which options I choose for various
> ports.
>
> I was wondering if there is some magic command-line syntax, (ideally to
> postmaster) that would let me document the options selected in the form o=
f
> a command =E2=80=94 something like:
>
>         postmaster editors/vim -o NOLUA,NOPYTHON,NORUBY,CONSOLE,NOGNOME
>
> (to indicate the changes from the default settings; I would be fine if I
> had to specify every option, I suppose, but ideally only ones that change=
d=E2=80=A6)
>
> Thanks,
> Ricky
>
>
Short answer is "no". because the ports system always remembers teh chosen
configuration for any port and that is stored in the pkg database, I am not
aware of any tool that allows setting of options from the command line.
That said, it is certainly possible and does not look difficult to
implement. It would probably be both easiest and more supportable to set
the options in the command line into the DB. Of course, '-o' is already in
use, so that would net be available.

More difficult to deal with is the issue of default options. Frankly, that
is not an issue that is really handled at all well with any of the current
tools and periodically bites my in the ass. Clearly, requiring all options
to e listed on the command line is not workable. (Just look at the list of
options on some multimedia ports.) So the assumption is that the command
line only specifies variations from defaults, but that does not address how
to deal with changes in defaults or with deleted options. I don't have
obvious answers on this. Do you? It's certainly not trivial.

As a non-answer to your question, maybe a dump of the current options. That
could easily be added to most any tool ad it is a one-line command.
make -C PORT_PATH showconfig
where "PORT_PATH" is the path to the port, e.g.
/usr/ports/multimedia/ffmpeg. It could easily in a simple wrapper around
some other command such as portmaster.

Maybe someone else has a better idea, but it does not look at all simple to
me.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1snZchKucCgAR44LB_M-LDPF5gfqkinTXMYw=Vq8UMggg>