From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 17 20:00:28 2005 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 [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 463E516A41F for ; Thu, 17 Nov 2005 20:00:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD60043D46 for ; Thu, 17 Nov 2005 20:00:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jAHK0RTR058668 for ; Thu, 17 Nov 2005 20:00:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jAHK0R9p058667; Thu, 17 Nov 2005 20:00:27 GMT (envelope-from gnats) Date: Thu, 17 Nov 2005 20:00:27 GMT Message-Id: <200511172000.jAHK0R9p058667@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Pav Lucistnik Cc: Subject: Re: ports/89164: [PATCH] /var/db/pkg/{portname}/+CONTENTS files sometimes contain wrong data X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pav Lucistnik List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2005 20:00:28 -0000 The following reply was made to PR ports/89164; it has been noted by GNATS. From: Pav Lucistnik To: vd@datamax.bg Cc: bug-followup@FreeBSD.org Subject: Re: ports/89164: [PATCH] /var/db/pkg/{portname}/+CONTENTS files sometimes contain wrong data Date: Thu, 17 Nov 2005 20:57:57 +0100 > > Yes, there is a long standing problem and we're aware of it. Sadly, no > > workable solution was submitted so far (at least I haven't found any PR > > filed against it). > > > > Hmmz, what about the following: > > --- bsd.port.mk_dep.diff begins here --- > --- bsd.port.mk.orig Thu Nov 17 21:04:11 2005 > +++ bsd.port.mk.dep Thu Nov 17 21:18:21 2005 > @@ -4638,7 +4638,7 @@ > dir=$$(${REALPATH} $$dir); \ > if [ -d $$dir ]; then \ > if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ > - childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ > + childout=$$(cd $$dir ; pkgnm=`${MAKE} -V PKGNAME` ; if [ -d ${PKG_DBDIR}/$$pkgnm ] ; then for p in $$pkgnm `${PKG_INFO} -qr ${PKG_DBDIR}/$$pkgnm |${CUT} -f 2 -d ' '` ; do porigin=`pkg_info -qo /var/db/pkg/$$p` ; ${ECHO_CMD} "$$p ${PORTSDIR}/$$porigin $$porigin" ; done ; else ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list; fi); \ > set -- $$childout; \ > childdir=""; \ > while [ $$\# != 0 ]; do \ > @@ -4651,7 +4651,7 @@ > else \ > ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ > fi; \ > - done > + done | ${SORT} -u > > # Print out package names. > > --- bsd.port.mk_dep.diff ends here --- > > The idea is to check if the port is installed and get necessary > info with `pkg_info -r', instead of `make package-depends-list' > > Looks quite ugly, some part of the sh code can be extracted > into separate make variable or at least that 380+ bytes line can be > broken down into shorter lines. Have you runtested this? I'm not sure, this is the code which creates the list which is later stored in /var/db/pkg, right? So you can't read it before it's written. -- Pav Lucistnik Somebody ought to cross ball point pens with coat hangers so that the pens will multiply instead of disappear.