Date: Mon, 01 Mar 2004 02:17:55 +0100 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/63559: ports infrastructure: fix PKGORIGIN problems Message-ID: <40428F43.20409@fillmore-labs.com> Resent-Message-ID: <200403010120.i211KAEQ054661@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40428F43.20409>