pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Replace "pkg_admin -S lsbest" usage with pkg_info -...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dd004d11c16c
branches: trunk
changeset: 539663:dd004d11c16c
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Mar 10 20:05:59 2008 +0000
description:
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:
mk/buildlink3/bsd.buildlink3.mk | 12 +++++-------
mk/flavor/pkg/depends.mk | 4 ++--
mk/flavor/pkg/flavor-vars.mk | 4 ++--
mk/flavor/pkg/resolve-dependencies | 2 +-
4 files changed, 10 insertions(+), 12 deletions(-)
diffs (75 lines):
diff -r ba7f7b9af754 -r dd004d11c16c mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk Mon Mar 10 18:35:54 2008 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk Mon Mar 10 20:05:59 2008 +0000
@@ -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 @@
. 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 -r ba7f7b9af754 -r dd004d11c16c mk/flavor/pkg/depends.mk
--- a/mk/flavor/pkg/depends.mk Mon Mar 10 18:35:54 2008 +0000
+++ b/mk/flavor/pkg/depends.mk Mon Mar 10 20:05:59 2008 +0000
@@ -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 @@
" "${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 -r ba7f7b9af754 -r dd004d11c16c mk/flavor/pkg/flavor-vars.mk
--- a/mk/flavor/pkg/flavor-vars.mk Mon Mar 10 18:35:54 2008 +0000
+++ b/mk/flavor/pkg/flavor-vars.mk Mon Mar 10 20:05:59 2008 +0000
@@ -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 @@
# "${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 -r ba7f7b9af754 -r dd004d11c16c mk/flavor/pkg/resolve-dependencies
--- a/mk/flavor/pkg/resolve-dependencies Mon Mar 10 18:35:54 2008 +0000
+++ b/mk/flavor/pkg/resolve-dependencies Mon Mar 10 20:05:59 2008 +0000
@@ -30,7 +30,7 @@
}
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
Home |
Main Index |
Thread Index |
Old Index