Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2020 16:26:07 -0800
From:      Chris <portmaster@BSDforge.com>
To:        Mathieu Arnold <mat@FreeBSD.org>
Cc:        <freebsd-ports@freebsd.org>
Subject:   Re: What is the actual syntax used to FLAVOR ports?
Message-ID:  <5a0968af782c942447ae33762a10cdc2@udns.ultimatedns.net>
In-Reply-To: <20200211084553.6zpansexamvw5tl4@atuin.in.mat.cc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Feb 2020 09:45:53 +0100 Mathieu Arnold mat@FreeBSD=2Eorg said

> On Mon, Feb 10, 2020 at 09:02:34PM -0500, Ernie Luzar wrote:
> > Kevin Oberman wrote:
> > > On Sat, Feb 8, 2020 at 1:27 PM Chris <portmaster@bsdforge=2Ecom> wrote:
> > >=20
> > > > OK I know FLAVOR is an evolving concept=2E But I can not find
> > > > the FLAVOR documentation=2E Only references in the porters
> > > > handbook=2E What I think needs to be available is an entire
> > > > list of flavor tags for all (port) categories=2E
> > > > For example;
> > > > make FLAVOR=3Dpython27 returns the error use py27=2E
> > > > OK now I know how to flavor, and build python flavors=2E
> > > > But what of Perl?
> > > > make FLAVOR=3Dperl2=2E8=2E Nope=2E How about make FLAVOR=3Dp5-28,
> > > > and so it goes=2E=2E=2E
> > > > Does there exist a definitive list of flavors? It'd
> > > > also be valuable for defining defaults in make=2Econf(5)
> > > >=20
> > > > Thanks!
> > > >=20
> > > > --Chris
> > >=20
> > >=20
> > > The problem is not having a clear understanding of what a FLAVOR is a=
nd
> > > when it is used=2E
> > >=20
> > > FLAVORS are generally a way to deal with the problem of incompatible
> > > versions and Python is the poster child=2E Python2 and Python3 are two
> > > version of a VERY popular language that have significant syntax
> > > incompatibilities=2E While a program written for gcc-4=2E2 should work fi=
ne
> > > when compiled with gcc-7, it is VERY unlikely that a program written =
for
> > > Python2 will work with Python3=2E While the changes needed are often fa=
irly
> > > straight forward, they have to be made=2E The result is a requirement o=
f
> > > having both interpreters installed and two packages of of most Python
> > > libraries built from a single source=2E
> > >=20
> > > Adding FLAVORS for a port is an expensive operation and is never ligh=
tly
> > > approved by the ports management team as it adds a great deal of
> > complexity
> > > and both human and machine overhead=2E Requests to FLAVOR a port are
> > > carefully reviewed and will only be approved with adequate justificat=
ion=2E
> > >=20
> > > In the case of Perl, no attempt to flavor it has been needed=2E Most Pe=
rl
> > > packages (p5-*) will work with any of the three available ports=2E In m=
ost
> > > cases they may be installed and continue to work across versions with=
 no
> > > changes=2E Python (py-) ports MUST be reinstalled to move from Python2 =
to
> > > Python3=2E Some have not had required changes to work with Python3 made=
 and,
> > > initially, almost none did=2E Some have now been written with no suppor=
t for
> > > Python2=2E All of this has to be properly handled by the package buildi=
ng
> > > system and it is not at all trivial=2E
> > >=20
> > > As of today, I believe the only FLAVORed ports are those using emacs,
> > > lazarus, php, and, of course, python=2E By "using", I mean that the por=
t
> > > Makefile includes "USE_PYTHON" or similar USE_ definitions of the oth=
er
> > > languages=2E (Yes, emacs is not a language, but elisp, the core of emac=
s, is
> > > and lazarus is an IDE for Pascal=2E)
> > >=20
> > > I'm sorry of this is not entirely clear, but I hope it helps and I ho=
pe it
> > > is all correct=2E I may have worded some of it poorly=2E
> > > --
> > > Kevin Oberman, Part time kid herder and retired Network Engineer
> > > E-mail: rkoberman@gmail=2Ecom
> > > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
> >=20
> > wow the above reply is not how I remember how things were envisioned wh=
en
> > this flavor function was first talked about=2E Having to get permission f=
irst
> > and being limited to languages was never talked about and not at all a
> > requirement=2E
>=20
Thank you *very* much for the link and reply, Mathieu!
I must admit to being fairly embarrassed for having missed it=2E

> Having to get permissions was never envisioned, and we will stop having
> it as a requirement when people stop trying to forcefully do very silly
> things, it will probably be relaxed when we have subpackages=2E
> It is not at all limited to languages, I have no idea where that came
> from=2E  You only have to grep for '^FLAVORS=3D' to see that=2E
Good tip! I think it's simply *easiest* to think of it in terms of language=
s,
akin to DEFAULT_VERSIONS=2E
>=20
> > It was envisioned as a way to per can a set of different
> > defaults so a package with pre canned defaults would be auto built in t=
he
> > ports system that is different from the basic defaults=2E  ON the subject=
 of
> > documentation about how to set up flavors for a port is totally lacking=
 at
> > this point=2E You know the old saying, developers are good programmers bu=
t are
> > terrible at documenting their work if they do it at all=2E So with that i=
n
> > mind do your own thing following what you see for flavored languages as=
 a
> > loosely followed guide=2E
>=20
> Flavors have been documented from day one=2E
>=20
> https://www=2Efreebsd=2Eorg/doc/en/books/porters-handbook/flavors=2Ehtml
>=20
> (I kinda know because I wrote (most of) the flavors code, and I also
> write (most of) the documentation=2E)
Given some of the replies to this topic=2E It might be wise for someone(tm)
to write an introductory to FLAVORS in the Handbook, with perhaps a link to
the FLAVORS section of the porters-handbook=2E

Thanks again!

--Chris
>=20
> --=20
> Mathieu Arnold





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