Date: Tue, 17 Jul 2007 19:46:11 -0500 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Slight problem with make actual-package-depends with ports Message-ID: <469D62D3.70908@math.missouri.edu>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------010700020604010509030004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I appreciate that most people won't have this problem, but it has bitten me.
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.
I enclose a patch. Unless I get a bunch of negative comments, I'll
submit this as a PR as well.
Stephen
--------------010700020604010509030004
Content-Type: text/plain;
name="ddd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ddd"
--- 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\#\#*/}; \
--------------010700020604010509030004--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?469D62D3.70908>
