Date: Fri, 5 Mar 2010 01:02:22 GMT From: Brooks Davis <brooks@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: netchild@FreeBSD.org Subject: ports/144482: actual-package-depends rejects origins at non-standard depths Message-ID: <201003050102.o2512Mhs054095@freefall.freebsd.org> Resent-Message-ID: <201003050110.o251A2QT054167@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 144482 >Category: ports >Synopsis: actual-package-depends rejects origins at non-standard depths >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 05 01:10:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Brooks Davis >Release: FreeBSD 8.0-RC1 i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 8.0-RC1 FreeBSD 8.0-RC1 #41 r197738: Sun Oct 4 11:00:31 UTC 2009 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386 >Description: The introduction of the actual-package-depends target in ports/112765 sped up port installation and generally things better. However, it broke the recording of dependencies on packages from non-standard subtrees of ${PORTSDIR} with depths other than 2. For example, at work we maintain an additional set of ports at ${PORTSDIR}/aero/<category>/<port>. The package-depends target lists those ports when they are dependencies, but actual-package-depends rejects them because it attempts to normalize the origin by extracting the last two directories from the path and then checking if that is a path relative to ${PORTSDIR}. Since our internal ports are all three directories deep this fails. I propose the following patch as a compromise. If the origin is relative to ${PORTSDIR} it works for any depth, but if not it falls back to the old logic. This causes our internal ports to be recordable as dependencies. >How-To-Repeat: >Fix: --- bsd.port.mk.orig 2010-03-04 17:03:47.000000000 -0800 +++ bsd.port.mk 2010-03-04 17:01:46.000000000 -0800 @@ -5494,8 +5494,13 @@ fi; \ done); \ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ - tmp=$${dir%/*}; \ - dir=$${tmp\#\#*/}/$${dir\#\#*/}; \ + tmp=$${dir\#${PORTSDIR}/}; \ + if [ "$$tmp" = "$$dir" ]; then \ + tmp=$${dir%/*}; \ + dir=$${tmp\#\#*/}/$${dir\#\#*/}; \ + else \ + dir=$$tmp; \ + fi; \ set -- $$origins; \ while [ $$\# -gt 1 ]; do \ if [ ! -d "${PORTSDIR}/$$2" ]; then \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003050102.o2512Mhs054095>