Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2014 23:58:49 -0400
From:      "John W. O'Brien" <john@saltant.com>
To:        Kevin Oberman <rkoberman@gmail.com>
Cc:        Randy Pratt <bsd-unix@embarqmail.com>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: Discover stored options different from port defaults/defines
Message-ID:  <533A3979.1020109@saltant.com>
In-Reply-To: <CAN6yY1sA0U2WrxZ0zvMV24e_z31RAfYrK7MydU7AnWoxKJ1eyA@mail.gmail.com>
References:  <533888EB.2060503@saltant.com>	<20140330222127.a9175c2b48147295ee06cb0a@embarqmail.com>	<53397FE5.3080902@saltant.com> <CAN6yY1sA0U2WrxZ0zvMV24e_z31RAfYrK7MydU7AnWoxKJ1eyA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--eGEMgRUcGWsG4WqcCN05bw7POhMgtlP3S
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 3/31/14 3:47 PM, Kevin Oberman wrote:
> This is something I've wanted to have for quite a while, but never
> enough to dig through the Makefiles.
>=20
> I think the proper way would be for "make showconfig" to print out the
> current config as it does now, but to tag default options (e.g. '+') so=

> that it would be easy to note that some option that you never touched
> and probably don't really even understand had had the default changed
> and you probably want to match that change.

There are two dimensions, though, and the showconfig annotations you
describe captures just one of them.

1.  Is this option set the same as the default?
2.  Is this an option I care about pinning?

Your proposal addresses #1. I already solved this for myself in an
ad-hoc manner. I placed an additional requirement on my solution that it
generate machine-readable output. Incidentally, there was a compelling
thread a few months ago which briefly discussed [0] the possibility of
teaching core CLI tools to output structured data like XML, JSON, etc.
The ports machinery would be another great candidate for that kind of
capability.

Anyway, I used the information from #1 as hints about what I was
thinking about #2 at the time I originally configured the port. Then I
put ${OPTIONS_NAME}_SET=3DFOO and ${OPTIONS_NAME}_UNSET=3DBAR in make.con=
f
as a way to express and record #2.

For example:

    devel_git_SET=3D     GITWEB GUI
    editors_vim_UNSET=3D RUBY

I can feed this, and little else, to poudriere and remain confident that
as long as devel/git knows about the options GITWEB and GUI, and
editors/vim knows about the option RUBY, I can update my ports tree and
rebuild my packages until the sun comes up and those options will remain
pinned.

> A 'pkg info' option to provide a list of changed defaults in installed
> ports would be even nicer. Something equivalent to "pkg version -vl\<"
> perhaps. But just doing it in "make showconfig" would make a script tha=
t
> would parse 'pkg version' optput and do a "make showconfig", only
> printing out the tagged lines, when any changes are noted would be triv=
ial.

Would pkg-info be the place for this? It's looking at state data that
has no notion of history. pkg-info could show available options,
defaults, and built-with options, all as of build-time. It would be up
to pkg-upgrade to send up a flare, on request, if these sets changed
from the currently-installed package to the about-to-be-installed package=
=2E

I would also be interested in an equivalent a poudriere feature, because
it's at the moment I update a ports tree in preparation for building new
packages that I want to know if a port I build just grew a new option
that I might want to pin per #2.

Regards,
John

[0]
http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076205.ht=
ml


--eGEMgRUcGWsG4WqcCN05bw7POhMgtlP3S
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBCgAGBQJTOjl9AAoJEORay8JGGICYYS0IAJgQFoIlBE8lEpBzYQtUF7K2
nNvC7Sw5wzJseQq0BVoFchI3ABkUwpFv7kI0pVX0El5x/15325N5L8s4VK/lFTqD
rMJXU2FFp1fRJT6+kFoaZJb0XCclpwiuMfexKloLpVtddMhP0wMJGqfEK8Ao7IG7
vIel18ABn/OzVJim7QobMdUxV5WnnCX4s/WctgwisenYbJ5HvcKen3Kmwefxq2ES
MKC6oGJDOYa6J/anYO8XLKS3ncHHuGOPZMnr4RzMJPu+r/Fl9kg6kF5zVe4ZGyLX
jalqxTvOYm1GefQgW/gj+I6fVw2Ej4v6Hy4YXnxrpl2948s0MY8JwhkoXwx/T3Y=
=s46v
-----END PGP SIGNATURE-----

--eGEMgRUcGWsG4WqcCN05bw7POhMgtlP3S--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?533A3979.1020109>