pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Add a new variable CHECK_FILES_SUPPORTED which is a pa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/20f47dcb6909
branches:  trunk
changeset: 514262:20f47dcb6909
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Jun 09 16:12:08 2006 +0000

description:
Add a new variable CHECK_FILES_SUPPORTED which is a package-settable
variable to show whether the package supports running the check-files
target.

Set CHECK_FILES_SUPPORTED to "no" in pkgtools/pkg_install in the case
where the PREFIX does not match ${LOCALBASE} it's likely the tools are
being installed in some place that's completely outside pkgsrc control,
and check-files fails horribly in that case.

diffstat:

 mk/check/bsd.check-vars.mk    |   3 ++-
 mk/check/check-files.mk       |   7 ++++++-
 pkgtools/pkg_install/Makefile |  10 +++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 7be496a7aa88 -r 20f47dcb6909 mk/check/bsd.check-vars.mk
--- a/mk/check/bsd.check-vars.mk        Fri Jun 09 16:05:11 2006 +0000
+++ b/mk/check/bsd.check-vars.mk        Fri Jun 09 16:12:08 2006 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: bsd.check-vars.mk,v 1.2 2006/06/06 15:28:52 jlam Exp $
+# $NetBSD: bsd.check-vars.mk,v 1.3 2006/06/09 16:12:08 jlam Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
 # bsd.check.mk is included.
 #
 
+CHECK_FILES_SUPPORTED?=                yes
 CHECK_SHLIBS_SUPPORTED?=       yes
 
 USE_TOOLS+=    awk cat cmp diff echo find grep rm sed test touch true
diff -r 7be496a7aa88 -r 20f47dcb6909 mk/check/check-files.mk
--- a/mk/check/check-files.mk   Fri Jun 09 16:05:11 2006 +0000
+++ b/mk/check/check-files.mk   Fri Jun 09 16:12:08 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-files.mk,v 1.3 2006/06/09 13:59:08 jlam Exp $
+# $NetBSD: check-files.mk,v 1.4 2006/06/09 16:12:08 jlam Exp $
 
 .if defined(PKG_DEVELOPER)
 CHECK_FILES?=          yes
@@ -174,7 +174,12 @@
 # subtarget.
 #
 .PHONY: check-files
+.if !empty(CHECK_FILES_SUPPORTED:M[nN][oO])
+check-files:
+       @${DO_NADA}
+.else
 check-files: check-files-message ${_CHECK_FILES_ERRMSGS} error-check
+.endif
 
 .PHONY: check-files-message
 check-files-message:
diff -r 7be496a7aa88 -r 20f47dcb6909 pkgtools/pkg_install/Makefile
--- a/pkgtools/pkg_install/Makefile     Fri Jun 09 16:05:11 2006 +0000
+++ b/pkgtools/pkg_install/Makefile     Fri Jun 09 16:12:08 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.125 2006/03/14 01:14:32 jlam Exp $
+# $NetBSD: Makefile,v 1.126 2006/06/09 16:12:08 jlam Exp $
 
 # Notes to package maintainers:
 #
@@ -79,6 +79,14 @@
 PKGMANDIR=             share/man
 .endif
 
+# If ${PKG_TOOLS_PREFIX} doesn't match ${LOCALBASE}, then don't run
+# check-files since it's likely ${PKG_TOOLS_PREFIX} contains directories
+# that shouldn't be checked.
+#
+.if ${PKG_TOOLS_PREFIX} != ${LOCALBASE}
+CHECK_FILES_SUPPORTED= no
+.endif
+
 do-extract:
        @${CP} -R ${FILESDIR} ${WRKSRC}
 



Home | Main Index | Thread Index | Old Index