tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Restructuring digest dependency
Hi all,
the attached patch makes NO_CHECKSUM only that -- not check the sums.
If a package has PATCHFILES or DISTFILES set, digest will be added as
dependency. Commented out in the patch is depending on ftp as tool, that
is left for latter and a requirement to drop ftp from the bootstrap
list.
I'm looking for tests and review :-)
Joerg
Index: bsd.pkg.mk
===================================================================
RCS file: /data/repo/netbsd/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1941
diff -u -p -r1.1941 bsd.pkg.mk
--- bsd.pkg.mk 3 Apr 2008 14:07:51 -0000 1.1941
+++ bsd.pkg.mk 12 May 2008 13:06:26 -0000
@@ -404,8 +404,6 @@ USE_TOOLS+=
\
mkdir mv pax printf pwd rm rmdir sed sh sort \
tail test touch tr true wc xargs
-USE_TOOLS+= ${NO_CHECKSUM:D:Udigest\:bootstrap}
-
# bsd.wrapper.mk
USE_TOOLS+= expr
Index: checksum/bsd.checksum-vars.mk
===================================================================
RCS file: /data/repo/netbsd/pkgsrc/mk/checksum/bsd.checksum-vars.mk,v
retrieving revision 1.1
diff -u -p -r1.1 bsd.checksum-vars.mk
--- checksum/bsd.checksum-vars.mk 13 Jul 2006 14:02:34 -0000 1.1
+++ checksum/bsd.checksum-vars.mk 20 May 2008 13:05:46 -0000
@@ -10,3 +10,7 @@
#
DISTINFO_FILE?= ${PKGDIR}/distinfo
+
+.if !empty(_CKSUMFILES)
+USE_TOOLS+= digest:bootstrap
+.endif
Index: checksum/checksum.mk
===================================================================
RCS file: /data/repo/netbsd/pkgsrc/mk/checksum/checksum.mk,v
retrieving revision 1.12
diff -u -p -r1.12 checksum.mk
--- checksum/checksum.mk 9 Oct 2007 19:19:13 -0000 1.12
+++ checksum/checksum.mk 20 May 2008 13:07:55 -0000
@@ -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
Index: fetch/bsd.fetch-vars.mk
===================================================================
RCS file: /data/repo/netbsd/pkgsrc/mk/fetch/bsd.fetch-vars.mk,v
retrieving revision 1.9
diff -u -p -r1.9 bsd.fetch-vars.mk
--- fetch/bsd.fetch-vars.mk 2 Nov 2007 09:02:57 -0000 1.9
+++ fetch/bsd.fetch-vars.mk 20 May 2008 13:08:12 -0000
@@ -39,13 +39,30 @@ _DISTDIR= ${DISTDIR}/${DIST_SUBDIR}
DEFAULT_DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES?= ${DEFAULT_DISTFILES}
-# "Failover" fetching requires the digest tool to compute checksums to
-# verify any fetched files. But if no checksumming is requested, don't
-# add it.
-#
-.if defined(FAILOVER_FETCH) && !defined(NO_CHECKSUM)
-USE_TOOLS+= ${FAILOVER_FETCH:Ddigest\:bootstrap}
+# File lists, defined early to allow tool dependencies.
+ALLFILES?= ${DISTFILES} ${PATCHFILES}
+ALLFILES:= ${ALLFILES:O:u} # remove duplicates
+CKSUMFILES?= ${ALLFILES}
+.for __tmp__ in ${IGNOREFILES}
+CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
+.endfor
+
+# List of all files, with ${DIST_SUBDIR} in front. Used for fetch and
checksum.
+.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
+_CKSUMFILES?= ${CKSUMFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
+_DISTFILES?= ${DISTFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
+_IGNOREFILES?= ${IGNOREFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
+_PATCHFILES?= ${PATCHFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
+.else
+_CKSUMFILES?= ${CKSUMFILES}
+_DISTFILES?= ${DISTFILES}
+_IGNOREFILES?= ${IGNOREFILES}
+_PATCHFILES?= ${PATCHFILES}
.endif
+_ALLFILES?= ${_DISTFILES} ${_PATCHFILES}
+_ALLFILES:= ${_ALLFILES:O:u} # remove duplicates
+
+_BUILD_DEFS+= _DISTFILES _PATCHFILES
# When mirroring distfiles which others may fetch, only fetch the
# distfiles if it is allowed to be re-distributed freely. Also,
@@ -55,3 +72,10 @@ USE_TOOLS+= ${FAILOVER_FETCH:Ddigest\:b
NO_SKIP= # defined
_BOOTSTRAP_VERBOSE= # defined
.endif
+
+.if !empty(_CKSUMFILES)
+#USE_TOOLS+= ftp:bootstrap
+. if defined(FAILOVER_FETCH)
+USE_TOOLS+= digest:bootstrap
+. endif
+.endif
Index: fetch/fetch.mk
===================================================================
RCS file: /data/repo/netbsd/pkgsrc/mk/fetch/fetch.mk,v
retrieving revision 1.33
diff -u -p -r1.33 fetch.mk
--- fetch/fetch.mk 3 Apr 2008 14:07:51 -0000 1.33
+++ fetch/fetch.mk 20 May 2008 13:06:30 -0000
@@ -6,30 +6,6 @@ _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVE
# Where to put distfiles that don't have any other master site
MASTER_SITE_LOCAL?= ${MASTER_SITE_BACKUP:=LOCAL_PORTS/}
-ALLFILES?= ${DISTFILES} ${PATCHFILES}
-ALLFILES:= ${ALLFILES:O:u} # remove duplicates
-CKSUMFILES?= ${ALLFILES}
-.for __tmp__ in ${IGNOREFILES}
-CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
-.endfor
-
-# List of all files, with ${DIST_SUBDIR} in front. Used for fetch and
checksum.
-.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
-_CKSUMFILES?= ${CKSUMFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
-_DISTFILES?= ${DISTFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
-_IGNOREFILES?= ${IGNOREFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
-_PATCHFILES?= ${PATCHFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
-.else
-_CKSUMFILES?= ${CKSUMFILES}
-_DISTFILES?= ${DISTFILES}
-_IGNOREFILES?= ${IGNOREFILES}
-_PATCHFILES?= ${PATCHFILES}
-.endif
-_ALLFILES?= ${_DISTFILES} ${_PATCHFILES}
-_ALLFILES:= ${_ALLFILES:O:u} # remove duplicates
-
-_BUILD_DEFS+= _DISTFILES _PATCHFILES
-
# Set up _ORDERED_SITES to work out the exact list of sites for every file,
# using the dynamic sites script, or ordering according to the master site
# list, MASTER_SORT_RANDOM randomization feature, or the patterns in
Home |
Main Index |
Thread Index |
Old Index