Unexpected results from "make index" on a ports tree in a non-standard location,

Conrad J. Sabatier conrads at cox.net
Sun Mar 4 23:28:39 UTC 2012

On Sun, 4 Mar 2012 17:20:36 -0600
"Conrad J. Sabatier" <conrads at cox.net> wrote:

> To test mkreadmes handling of ports trees in non-standard locations, I
> just did the following:
> #cd /usr
> #mv ports /usr/local
> #cd /usr/local/ports
> #export PORTSDIR=/usr/local/ports
> #make index
> All seemed to proceed normally during the index build, but when I
> checked the resulting INDEX-10 file, all of the ports' paths were
> still using /usr/ports, not /usr/local/ports.
> Did I overlook something, or is there a defect in "make index"?

Ah, I just took a look at Tools/scripts/make_index, and found the

# Save where we are so that we can map all directories formed
# from ${PORTSDIR} to their canonical location '/usr/ports/...'.
chomp($pwd = `pwd`);

# Read each line of output generated by the 'index' target.
while (<>) {

    my @f = split(/\|/);

  # Force to canonical form.
    $f[1] =~ s!^$pwd!/usr/ports!o;
    $f[4] =~ s!^$pwd!/usr/ports!o;

So, I take it, the index file is *supposed* to always map port paths to
"/usr/ports", regardless of where the ports tree is actually located?

Seems a little odd to me, but if that's the case, I guess I'll have to
make some adjustments to mkreadmes.

Conrad J. Sabatier
conrads at cox.net

More information about the freebsd-ports mailing list