ports/89164: [PATCH] /var/db/pkg/{portname}/+CONTENTS files sometimes contain wrong data
Vasil Dimov
vd at datamax.bg
Thu Nov 17 19:34:09 UTC 2005
On Thu, Nov 17, 2005 at 05:46:25PM +0100, Pav Lucistnik wrote:
>
> 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.
--
Vasil Dimov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs/attachments/20051117/adf13a4f/attachment.sig>
More information about the freebsd-ports-bugs
mailing list