pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Check that ${_PKG_DBDIR} exists before c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/147b522c3155
branches:  trunk
changeset: 461051:147b522c3155
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Sep 10 02:16:42 2003 +0000

description:
Check that ${_PKG_DBDIR} exists before cd'ing into it.  This makes
building using buildlink3 on systems that have never seen pkgsrc before
work properly.

diffstat:

 mk/buildlink3/bsd.buildlink3.mk |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r f942b006c26e -r 147b522c3155 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Wed Sep 10 01:57:06 2003 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Wed Sep 10 02:16:42 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.8 2003/09/09 09:15:03 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.9 2003/09/10 02:16:42 jlam Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -137,7 +137,10 @@
 .for _pkg_ in ${BUILDLINK_PACKAGES} ${_BLNK_X11_LINKS_PACKAGE}
 .  if !defined(_BLNK_PKG_DBDIR.${_pkg_})
 _BLNK_PKG_DBDIR.${_pkg_}!=     \
-       dir=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -s "" lsbest "${BUILDLINK_DEPENDS.${_pkg_}}" || ${TRUE}`; \
+       dir="";                                                         \
+       if [ -d ${_PKG_DBDIR} ]; then                                   \
+               dir=`cd ${_PKG_DBDIR}; ${PKG_ADMIN} -s "" lsbest "${BUILDLINK_DEPENDS.${_pkg_}}" || ${TRUE}`; \
+       fi;                                                             \
        case "$$dir" in                                                 \
        "")     dir="not_found" ;;                                      \
        *)      if [ -f $$dir/+DEPOT ]; then                            \



Home | Main Index | Thread Index | Old Index