From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 18 01:20:03 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D42316A40A for ; Wed, 18 Jul 2007 01:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAA013C4B9 for ; Wed, 18 Jul 2007 01:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6I1K3lm013746 for ; Wed, 18 Jul 2007 01:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6I1K3ZD013745; Wed, 18 Jul 2007 01:20:03 GMT (envelope-from gnats) Resent-Date: Wed, 18 Jul 2007 01:20:03 GMT Resent-Message-Id: <200707180120.l6I1K3ZD013745@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stephen Montgomery-Smith Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5601516A400 for ; Wed, 18 Jul 2007 01:17:05 +0000 (UTC) (envelope-from stephen@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 2AAA713C49D for ; Wed, 18 Jul 2007 01:17:05 +0000 (UTC) (envelope-from stephen@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (localhost [127.0.0.1]) by cauchy.math.missouri.edu (8.14.1/8.13.4) with ESMTP id l6I1H4pe090738 for ; Tue, 17 Jul 2007 20:17:04 -0500 (CDT) (envelope-from stephen@cauchy.math.missouri.edu) Received: (from stephen@localhost) by cauchy.math.missouri.edu (8.14.1/8.13.4/Submit) id l6I1H4rt090737; Tue, 17 Jul 2007 20:17:04 -0500 (CDT) (envelope-from stephen) Message-Id: <200707180117.l6I1H4rt090737@cauchy.math.missouri.edu> Date: Tue, 17 Jul 2007 20:17:04 -0500 (CDT) From: Stephen Montgomery-Smith To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/114679: Slight problem with make actual-package-depends in ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stephen Montgomery-Smith List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 01:20:03 -0000 >Number: 114679 >Category: ports >Synopsis: Slight problem with make actual-package-depends in ports >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: Wed Jul 18 01:20:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Stephen Montgomery-Smith >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD cauchy 6.2-STABLE FreeBSD 6.2-STABLE #0: Tue Jul 17 13:10:02 CDT 2007 stephen@cauchy:/usr/obj/usr/src/sys/cauchy i386 >Description: After you have made and installed a port, but don't clean it, and then made a bunch of other ports, if you go back to the original port and then do "make package", then +CONTENTS can be a bit messed up for the package. This is because the creation of other ports might disturb _LIB_RUN_DEPENDS and might put in some extra entries in +CONTENTS. This happens to me because I make all my ports on one machine and then copy them as packages to other machines. Then on the other machines, the structure of /var/db/pkg gets a bit messed up and pkg_delete -r malfunctions. It seems to me that the cure is to slightly change "make actual-package-depends" so that if the port is already installed, it just uses +CONTENTS. >How-To-Repeat: >Fix: --- bsd.port.mk-old 2007-07-17 19:31:08.000000000 -0500 +++ bsd.port.mk 2007-07-17 19:29:16.000000000 -0500 @@ -5485,7 +5485,9 @@ done ACTUAL-PACKAGE-DEPENDS?= \ - if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \ + if [ -e ${PKG_DBDIR}/${PKGNAME}/+CONTENTS ]; then \ + ${AWK} -F '( |:)' 'BEGIN { pkgname="broken_contents" } /@pkgdep / { pkgname=$$2 } /@comment DEPORIGIN:/ { printf "%s:%s\n", pkgname, $$3; pkgname="broken_contents" }' ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \ + elif [ "${_LIB_RUN_DEPENDS}" != " " ]; then \ origins=$$(for pkgname in ${PKG_DBDIR}/*; do \ if [ -e $$pkgname/+CONTENTS ]; then \ ${ECHO_CMD} $${pkgname\#\#*/}; \ >Release-Note: >Audit-Trail: >Unformatted: