diff options
author | joerg <joerg@pkgsrc.org> | 2008-03-10 20:05:59 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-03-10 20:05:59 +0000 |
commit | 053f4aa0ea8d32c17684cf9308073a63bcce6ec3 (patch) | |
tree | 2f7fce81a0ce4819458d08c2ae0551339c829640 /mk | |
parent | fcd5cc0af744abd921cdc98ee5eef6620310b094 (diff) | |
download | pkgsrc-053f4aa0ea8d32c17684cf9308073a63bcce6ec3.tar.gz |
Replace "pkg_admin -S lsbest" usage with pkg_info -E. The base stripping
in bsd.buildlink3.mk was broken with pkg_install-20080309 was it
returned a relative path. It would have failed before e.g. with symbolic
links in the path. pkg_info -E is simpler and was added exactly for this
purpose. Fixes PR 38213 and PR 38211.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 12 | ||||
-rw-r--r-- | mk/flavor/pkg/depends.mk | 4 | ||||
-rw-r--r-- | mk/flavor/pkg/flavor-vars.mk | 4 | ||||
-rwxr-xr-x | mk/flavor/pkg/resolve-dependencies | 2 |
4 files changed, 10 insertions, 12 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index e1504c4c201..6b05c0cad79 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.201 2008/02/19 11:12:51 xtraeme Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.202 2008/03/10 20:05:59 joerg Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -278,13 +278,11 @@ _BLNK_PKG_DBDIR.${_pkg_}?= # empty . for _depend_ in ${BUILDLINK_API_DEPENDS.${_pkg_}} . if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found) _BLNK_PKG_DBDIR.${_pkg_}!= \ - dir=""; \ - if [ -d ${_PKG_DBDIR} ]; then \ - dir=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -S lsbest "${_depend_}" || ${TRUE}`; \ - fi; \ - case "$$dir" in \ + pkg=`${PKG_INFO} -E "${_depend_}" || ${TRUE}`; \ + case "$$pkg" in \ "") dir="_BLNK_PKG_DBDIR.${_pkg_}_not_found" ;; \ - *) if [ -f $$dir/+DEPOT ]; then \ + *) dir="${_PKG_DBDIR}/$$pkg"; \ + if [ -f $$dir/+DEPOT ]; then \ dir=`${HEAD} -1 $$dir/+DEPOT`; \ fi ;; \ esac; \ diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index 046bd348d03..c4eeff00626 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.40 2007/10/14 07:42:31 rillig Exp $ +# $NetBSD: depends.mk,v 1.41 2008/03/10 20:05:59 joerg Exp $ # This command prints out the dependency patterns for all full (run-time) # dependencies of the package. @@ -53,7 +53,7 @@ _LIST_DEPENDS_CMD.bootstrap= \ " "${BOOTSTRAP_DEPENDS:Q} " " " " _RESOLVE_DEPENDS_CMD= \ - ${SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} PKG_ADMIN=${PKG_ADMIN:Q} \ + ${SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} PKG_INFO=${PKG_INFO:Q} \ _DEPENDS_FILE=${_DEPENDS_FILE:Q} \ ${SH} ${PKGSRCDIR}/mk/flavor/pkg/resolve-dependencies \ " "${BOOTSTRAP_DEPENDS:Q} \ diff --git a/mk/flavor/pkg/flavor-vars.mk b/mk/flavor/pkg/flavor-vars.mk index 32ab03ee7c0..7443e0c17fe 100644 --- a/mk/flavor/pkg/flavor-vars.mk +++ b/mk/flavor/pkg/flavor-vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: flavor-vars.mk,v 1.6 2008/01/03 20:51:21 adrianp Exp $ +# $NetBSD: flavor-vars.mk,v 1.7 2008/03/10 20:05:59 joerg Exp $ # # This Makefile fragment is included indirectly by bsd.prefs.mk and # defines some variables which must be defined earlier than where @@ -86,7 +86,7 @@ LINKFARM?= ${LINKFARM_CMD} # "${PKG_INFO} -e pkgpattern" if the latter would return more than one # package name. # -_PKG_BEST_EXISTS?= ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest +_PKG_BEST_EXISTS?= ${PKG_INFO} -E # XXX Leave this here until all uses of this have been purged from the # XXX public parts of pkgsrc. diff --git a/mk/flavor/pkg/resolve-dependencies b/mk/flavor/pkg/resolve-dependencies index 30f343566e3..5c5a17bb259 100755 --- a/mk/flavor/pkg/resolve-dependencies +++ b/mk/flavor/pkg/resolve-dependencies @@ -30,7 +30,7 @@ error_msg() { } find_best() { - ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest $1 || ${TRUE} + ${PKG_INFO} -E $1 || ${TRUE} } ${CAT} ${DEPENDS_FILE} | while read type pattern dir; do |