On Mon, Jun 18, 2007 at 11:07:35AM +0300, Antti Harri wrote: > > On Mon, 18 Jun 2007, Joachim Schipper wrote: > > >You are doing something wrong; in casu, not RT appropriate FM, > >bsd.port.mk(5). Look for 'PORTSDIR'. > > I did read but I guess I missed it. That's where > I originally looked up the variable. It says there > > PORTSDIR Root of the ports tree (default: /usr/ports). > > and I'm setting it as /stuff/ports where my tree > currently is located so what's wrong?
looks like some environment variables intentionally get discarded in infrastructure scripts. for example in infrastructure/install/make-plist: ... cd $portsdir && env -i ... $make ... if it's a "permanent" setting, such as the location of the ports tree, use /etc/mk.conf. with PORTSDIR set in /etc/mk.conf 'make update-plist' works, but 'make lib-depends-check' (& port-lib-depends-check) complains: Asking ports for dependency pcre-7.1(devel/pcre) sh: cd: /usr/ports - No such file or directory Error: can't solve dependency for pcre-7.1/devel/pcre Asking ports for dependency pcre-7.1(devel/pcre) sh: cd: /usr/ports - No such file or directory Error: can't solve dependency for pcre-7.1/devel/pcre Asking ports for dependency pcre-7.1(devel/pcre) sh: cd: /usr/ports - No such file or directory Error: can't solve dependency for pcre-7.1/devel/pcre Asking ports for dependency pcre-7.1(devel/pcre) sh: cd: /usr/ports - No such file or directory Error: can't solve dependency for pcre-7.1/devel/pcre Bogus WANTLIB: pcre.1 (/usr/local/bin/ggrep) (NOT REACHABLE) below is a small patch to fix this. infrastructure/package/check-lib-depends uses PORTSDIR environmet variable, so I assume this was just overlooked? -- [EMAIL PROTECTED] SDF Public Access UNIX System - http://sdf.lonestar.org Index: bsd.port.mk =================================================================== RCS file: /home/cvs/OpenBSD/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.904 diff -u -r1.904 bsd.port.mk --- bsd.port.mk 16 Jun 2007 09:57:03 -0000 1.904 +++ bsd.port.mk 18 Jun 2007 09:27:11 -0000 @@ -1656,7 +1656,7 @@ lib-depends-check: @cd ${.CURDIR} && exec ${MAKE} package - @perl ${PORTSDIR}/infrastructure/package/check-lib-depends \ + @${SETENV} PORTSDIR=${PORTSDIR} perl ${PORTSDIR}/infrastructure/package/check-lib-depends \ ${_LIB_DEPENDS_FLAGS} -d ${_PKG_REPO} ${_PACKAGE_COOKIE} ${WRKINST}/.saved_libs: ${_FAKE_COOKIE} @@ -1665,7 +1665,7 @@ port-lib-depends-check: ${WRKINST}/.saved_libs . for _S in ${MULTI_PACKAGES} @-SUBPACKAGE=${_S} ${MAKE} print-plist-with-depends | \ - perl ${PORTSDIR}/infrastructure/package/check-lib-depends \ + ${SETENV} PORTSDIR=${PORTSDIR} perl ${PORTSDIR}/infrastructure/package/check-lib-depends \ ${_LIB_DEPENDS_FLAGS} -d ${_PKG_REPO} -B ${WRKINST} -s ${WRKINST}/.saved_libs . endfor