Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2012 17:28:25 -0600
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        freebsd-ports@FreeBSD.org
Cc:        Marco Steinbach <coco@executive-computing.de>
Subject:   Re: Unexpected results from "make index" on a ports tree in a non-standard location,
Message-ID:  <20120304172825.18de3735@cox.net>
In-Reply-To: <20120304172036.3963aafc@cox.net>
References:  <20120304172036.3963aafc@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 4 Mar 2012 17:20:36 -0600
"Conrad J. Sabatier" <conrads@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
following:

# 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 (<>) {
    chomp;
    s/\015$//;

    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@cox.net



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