Slight problem with make actual-package-depends with ports
Stephen Montgomery-Smith
stephen at math.missouri.edu
Wed Jul 18 01:06:09 UTC 2007
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
-------------- next part --------------
--- 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\#\#*/}; \
More information about the freebsd-hackers
mailing list