ports/63559: ports infrastructure: fix PKGORIGIN problems
Oliver Eikemeier
eikemeier at fillmore-labs.com
Mon Mar 1 01:20:10 UTC 2004
>Number: 63559
>Category: ports
>Synopsis: ports infrastructure: fix PKGORIGIN problems
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 29 17:20:10 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Oliver Eikemeier
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT
>Description:
PKGORIGIN is currently determined by (first category)/(CURDIR:T). Most
tools assume that the source for a port is found under PORTSDIR/PKGORIGIN,
failing if it isn't, like pkg_version -v or portupgrade.
Unfortunately the category directorys name is determined by using the
first entry of CATEGORIES. While it is desirable to have the main category
listed first, ports that violate this rule break more than the should.
This happens mostly for slave ports or after repocopies.
>How-To-Repeat:
>Fix:
Since it is not desirable to hinder ports with wrong CATEGORIES from
installing (portlint should check CATEGORIES, but not bsd.port.mk),
assign the right PKGCATEGORY automatically in
/usr/ports/(category)/Makefile.inc
This small shell script add a line the categories Makefile.inc where
this file exists (language specific ports), creating it where it doesn't:
#!/bin/sh
for d in /usr/ports/[a-z]*
do
makefile=$d/Makefile.inc
if [ ! -f $makefile ]
then
echo '# $FreeBSD$' > $makefile
echo '#' >> $makefile
echo >> $makefile
fi
echo 'PKGCATEGORY?= '${d##*/} >> $makefile
done
IMHO the use of USE_SUBMAKE in the following lines of bsd.port.mk makes
no sense to me and should be eliminated:
# If they exist, include Makefile.inc, then architecture/operating
# system specific Makefiles, then local Makefile.local.
.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
USE_SUBMAKE= yes
.endif
.if exists(${MASTERDIR}/../Makefile.inc)
.include "${MASTERDIR}/../Makefile.inc"
USE_SUBMAKE= yes
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list