summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjoerg <joerg>2008-03-10 20:05:59 +0000
committerjoerg <joerg>2008-03-10 20:05:59 +0000
commit8b868b04a2b9913598e442561ade0ecfba7e178e (patch)
tree2f7fce81a0ce4819458d08c2ae0551339c829640 /mk/buildlink3
parent879428c8e9b522a1f23f34baaca6a66fbfa52a2b (diff)
downloadpkgsrc-8b868b04a2b9913598e442561ade0ecfba7e178e.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/buildlink3')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk12
1 files changed, 5 insertions, 7 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; \