An intruiging INDEX problem -- slave ports + make.conf KNOBS

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Oct 31 18:53:10 UTC 2011


On 31/10/2011 17:39, Chris Rees wrote:
> Apparently if you define something in make.conf that slave ports also
> define, then a generated INDEX becomes useless...
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/162088
> 
> Basically, jpeg2ps-a4 -slave port of-> jpeg2ps-letter which defines
> A4=yes, and turns jpeg2ps into jpeg2ps-a4, thus duplicating INDEX
> records. Unfortunately, the master port is indexed first, so
> jpeg2ps-a4 is left with an incorrect origin...
> 
> Does anyone have any clever ideas around this?

One or two.  The generic code for building the INDEX treats this as an
error, but I don't see why that should be so.  Either you decide that
the package name column (the 1st column) should be the unique entry in
the INDEX and so you drop any duplicates, or you decide that the second
column -- directory path of the port -- should be the unique field.

The second option there makes more sense to me, as it better reflects
reality: with certain make variable settings there will be two or more
directories within the ports tree where building the port will result in
installing exactly the same port.  However the assumption made by most
of the software that interacts with the INDEX is that the first column
is the unique key.

Any way, my ports-mgmt/p5-FreeBSD-Portindex code will generate an INDEX
file for you despite this sort of collision.  By default it operates to
make the first column the unique key, but that can be very easily
changed if wanted.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20111031/38eabb23/signature.pgp


More information about the freebsd-ports mailing list