Re: HEADS-UP: Upcoming move of WWW definitions in all ports
- In reply to: Stefan Esser : "Re: HEADS-UP: Upcoming move of WWW definitions in all ports"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 Sep 2022 19:36:51 UTC
On Tue, Sep 06, 2022 at 09:04:10PM +0200, Stefan Esser wrote: > 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. > Thanks for the explanation. I had assumed that there was some motivation, but lacking acccess to the port-mgr mail archive makes it somewhat difficult to find the information. -- Steve