Re: FreeBSD ports community is broken [port building configuration notes]

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 19 Feb 2024 03:21:40 UTC
On Feb 18, 2024, at 17:23, Aryeh Friedman <aryehfriedman@gmail.com> wrote:

> On Sun, Feb 18, 2024 at 3:21 PM Mark Millard <marklmi@yahoo.com> wrote:
>> 
>> I fully agree that poudriere's systematic behavior
>> rebuilds more than the likes of portmaster [but fails
>> less often].
>> 
>> 
>> As stands there are tradeoffs between use of portmaster
>> (and the like) vs. use of poudriere (/synth?). No one
>> has produced an alternative that avoids the tradeoffs
>> as far as I know. So one picks between the tradeoffs
>> by the choice of which way to build.
> 
> The reason why no alternative has been produced yet is make it self is
> broken at the theoretical level.  Instead of doing a blond DFS it
> should build the entire DAG and then topolocgically walk it.    See
> Recursive Make Considered Harmful by P. Miller --
> https://accu.org/journals/overload/14/71/miller_2004/ (republished).
> While the DAG for the entire ports system (and for each port) is too
> big the DAG of what ports to do in what order is not and can easily be
> extracted from the ports make file.   So there is really no excuse for
> excessive building (just a question of converting it all to DAG --
> devel/cook does this and likely can be shoe horned into being a hybrid
> of allowing each port to use make recursively but at the top levle
> using a DAG).

FYI:

poudriere uses a prioritized topological sort of the package dependencies
made up front during the bulk build. There are files with the content
during the bulk run:

${MASTER_DATADIR}/pkg_deps is used to produce a temporary:

${MASTER_DATADIR}/pkg_deps.ptsort which is, in turn, used to produce:

${MASTER_DATADIR}/pkg_deps.priority which is used, in turn, to set up
the priority hash that is used.

There are checks for having cycles (that would invalidate the DAG
status).


Side note: devel/cook disapepared upstream some time ago and expired in
the ports tree and was removed at the end of 2023.


===
Mark Millard
marklmi at yahoo.com