Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Sep 2022 21:04:10 +0200
From:      Stefan Esser <se@freebsd.org>
To:        sgk@troutmask.apl.washington.edu
Cc:        FreeBSD ports <freebsd-ports@freebsd.org>, portmgr <portmgr@freebsd.org>
Subject:   Re: HEADS-UP: Upcoming move of WWW definitions in all ports
Message-ID:  <16ecf008-56db-a553-97cc-6183e56674a4@FreeBSD.org>
In-Reply-To: <YxeSAKcNiRtsmy/p@troutmask.apl.washington.edu>
References:  <8a896af9-b41e-d939-c71c-3b0b6b8366b6@FreeBSD.org> <YxeSAKcNiRtsmy/p@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 06.09.22 um 20:31 schrieb Steve Kargl:
> On Tue, Sep 06, 2022 at 08:09:24PM +0200, Stefan Esser wrote:
>> PortMgr has just accepted a change that has been in the making for some time:
>>
>> The move of the "WWW:" entries at the end of the ports' pkg-descr files into
>> the ports' Makefiles in the form of "WWW=" definitions.
>>
>> The WWW lines will be put into the maintainer block, immediately following
>> the MAINTAINER and COMMENT lines.
>>
>> If there is more than one WWW: line a pkg-descr file, one URL will be
>> selected to be moved into the Makefile, the other URLs will get a label
>> "See also:" instead of "WWW:".
>>
> 
> You've told us the "What" and suggested a "When".  So, what is
> the "Why?"
> 
> % find . -name pkg-descr -maxdepth 3 | wc -l
>     29110
> % find . -name Makefile -maxdepth 3 | wc -l
>     30343
> 
> Assuming 90% of the files are touched, 54000 files suffering cosmetic churn?

The idea to move the WWW entry from the pkg-descr to the Makefile has come up
multiple times in the past, back in 2015 for the first time that I know of,
see https://reviews.freebsd.org/D2949.

The question whether the churn caused by commits to 2 files of nearly all ports
has been discussed within the PortMgr team for some time. The decision to go
ahead has now been made, after all prerequisites have been met.


The WWW field is the only parameter in the INDEX file or in package manifests
that is not derived from some variable in the ports' Makefiles.

It has become stale in quite a number of ports over time, one reason might be
that the pkg-descr files are seldom touched after the initial commit. And many
of the URLs did not follow the rules laid out in the porters' handbook.

The most relevant WWW: entry in each pkg-descr file should be in the last line
(if there are multiple WWW: lines) and this line is currently extracted using
awk when the INDEX is built. But in fact, many ports have the relevant URL in
some other line and thus do not get any useful URL in the INDEX.

Moving the WWW value into the Makefile will make it easier to maintain and test
whether it is still valid. It removes processing overhead from "make index" and
it is a chance to select the most relevant entry from multiple URLs in many of
the pkg-descr files.

Best regards, STefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16ecf008-56db-a553-97cc-6183e56674a4>