Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2005 20:00:27 GMT
From:      Pav Lucistnik <pav@FreeBSD.org>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/89164: [PATCH] /var/db/pkg/{portname}/+CONTENTS files sometimes contain wrong data
Message-ID:  <200511172000.jAHK0R9p058667@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/89164; it has been noted by GNATS.

From: Pav Lucistnik <pav@FreeBSD.org>
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 <pav@oook.cz>
               <pav@FreeBSD.org>
 
 Somebody ought to cross ball point pens with coat hangers so that the
 pens will multiply instead of disappear.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511172000.jAHK0R9p058667>