diff options
author | joerg <joerg> | 2008-05-22 16:27:22 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-05-22 16:27:22 +0000 |
commit | 7ab910d1c81f81913271a31e340fecdfd480330f (patch) | |
tree | 7b37e655069e79fd739911e99f3b8294f9f482fc /mk/checksum | |
parent | 013eadb8ef75147bce52522b986a2d43fb45c24c (diff) | |
download | pkgsrc-7ab910d1c81f81913271a31e340fecdfd480330f.tar.gz |
Move digest dependency into checksum and fetch part.
Make _ALL_FILES and in turn _CKSUMFILES available earlier.
Use it to only depend on digest if _CKSUMFILES is non-empty.
NO_CHECKSUM will now only skip the checksum and checksum-phase
targets. FAILOVER_FETCH will independently check the sums on
distfiles and depend on digest, fixing the remaining issues
originally raised in PR 34914.
Diffstat (limited to 'mk/checksum')
-rw-r--r-- | mk/checksum/bsd.checksum-vars.mk | 6 | ||||
-rw-r--r-- | mk/checksum/bsd.checksum.mk | 13 | ||||
-rw-r--r-- | mk/checksum/checksum.mk | 9 |
3 files changed, 17 insertions, 11 deletions
diff --git a/mk/checksum/bsd.checksum-vars.mk b/mk/checksum/bsd.checksum-vars.mk index 24d69faab5b..2aa278033b9 100644 --- a/mk/checksum/bsd.checksum-vars.mk +++ b/mk/checksum/bsd.checksum-vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.checksum-vars.mk,v 1.1 2006/07/13 14:02:34 jlam Exp $ +# $NetBSD: bsd.checksum-vars.mk,v 1.2 2008/05/22 16:27:22 joerg Exp $ # # This Makefile fragment is included separately by bsd.pkg.mk and # defines some variables which must be defined earlier than where @@ -10,3 +10,7 @@ # DISTINFO_FILE?= ${PKGDIR}/distinfo + +.if !empty(_CKSUMFILES) +USE_TOOLS+= digest:bootstrap +.endif diff --git a/mk/checksum/bsd.checksum.mk b/mk/checksum/bsd.checksum.mk index a3e5e718d3a..62294c7e38c 100644 --- a/mk/checksum/bsd.checksum.mk +++ b/mk/checksum/bsd.checksum.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.checksum.mk,v 1.8 2008/01/04 01:46:26 rillig Exp $ +# $NetBSD: bsd.checksum.mk,v 1.9 2008/05/22 16:27:22 joerg Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the "checksum" phase. @@ -30,9 +30,11 @@ # Package-settable variables: # # NO_CHECKSUM -# When defined, no checksums are generated for patches or +# When defined, no checksums are validated for patches or # distfiles. # +# Note: This does not alter the behaviour of FAILOVER_FETCH. +# # Default value: undefined # @@ -43,9 +45,4 @@ checksum checksum-phase distinfo makesum: fetch makedistinfo mdi: distinfo mps: makepatchsum -.if defined(NO_CHECKSUM) -checksum checksum-phase makesum makepatchsum mps mdi makedistinfo distinfo: - @${DO_NADA} -.else -. include "checksum.mk" -.endif +.include "checksum.mk" diff --git a/mk/checksum/checksum.mk b/mk/checksum/checksum.mk index 5b6ec75e06e..8d809e8e5b7 100644 --- a/mk/checksum/checksum.mk +++ b/mk/checksum/checksum.mk @@ -1,4 +1,4 @@ -# $NetBSD: checksum.mk,v 1.12 2007/10/09 19:19:13 martti Exp $ +# $NetBSD: checksum.mk,v 1.13 2008/05/22 16:27:22 joerg Exp $ # # See bsd.checksum.mk for helpful comments. # @@ -6,7 +6,7 @@ _DIGEST_ALGORITHMS?= SHA1 RMD160 _PATCH_DIGEST_ALGORITHMS?= SHA1 -# These variables are set by pkgsrc/mk/fetch/fetch.mk. +# These variables are set by pkgsrc/mk/fetch/bsd.fetch-vars.mk. #_CKSUMFILES?= # empty #_IGNOREFILES?= # empty @@ -32,6 +32,10 @@ _CHECKSUM_CMD= \ TEST=${TOOLS_TEST:Q} \ ${SH} ${PKGSRCDIR}/mk/checksum/checksum \ +.if defined(NO_CHECKSUM) +checksum checksum-phase: + @${DO_NADA} +.else checksum checksum-phase: ${RUN} set -e; \ case ${.TARGET:Q} in \ @@ -45,6 +49,7 @@ checksum checksum-phase: ${ERROR_MSG} "\"${MAKE} NO_CHECKSUM=yes [other args]\"."; \ exit 1; \ fi +.endif _DISTINFO_CMD= ${SETENV} DIGEST=${TOOLS_DIGEST:Q} SED=${TOOLS_SED:Q} \ TEST=${TOOLS_TEST:Q} WC=${TOOLS_WC:Q} \ |