tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make mdi: shell limit exceeded
On Sun, May 12, 2024 at 11:09:03PM +0200, Roland Illig wrote:
> More than a megabyte is a whole lot for a distinfo file. Maybe we need
> to add another option to mk/checksum/distinfo.awk that accepts the
> filenames not on the command line but reads them from a separate file.
I came up with the attached diff. I think the awk part is ok but the
make part could do with improvements - suggestions?
(Yes, it works for wip/grafana!)
Thomas
Index: checksum/checksum.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/checksum/checksum.mk,v
retrieving revision 1.26
diff -u -r1.26 checksum.mk
--- checksum/checksum.mk 8 May 2022 12:25:18 -0000 1.26
+++ checksum/checksum.mk 12 May 2024 22:08:52 -0000
@@ -78,12 +78,16 @@
_DISTINFO_ARGS_PATCHSUM+= ${PATCHDIR}/patch-*
_DISTINFO_ARGS_PATCHSUM+= ${PATCHDIR}/emul-*-patch-*
+_DISTINFO_INPUTFILE= ${DISTINFO_FILE}.filelist
+
distinfo:
+.for file in ${_CKSUMFILES}
+ @${ECHO} ${file} >> ${_DISTINFO_INPUTFILE}
+.endfor
${RUN}set -e; \
newfile=${DISTINFO_FILE}.$$$$; \
if ${_DISTINFO_CMD} ${_DISTINFO_ARGS_COMMON} \
- ${_DISTINFO_ARGS_DISTSUM} \
- ${_DISTINFO_ARGS_PATCHSUM} > $$newfile; \
+ -I ${_DISTINFO_INPUTFILE} ${_DISTINFO_ARGS_PATCHSUM} > $$newfile; \
then \
${RM} -f $$newfile; \
${ECHO_MSG} "=> distinfo: unchanged."; \
@@ -91,6 +95,7 @@
${RM} -f ${DISTINFO_FILE}; \
${MV} -f $$newfile ${DISTINFO_FILE}; \
fi
+ @rm ${_DISTINFO_INPUTFILE}
makesum:
${RUN}set -e; \
Index: checksum/distinfo.awk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/checksum/distinfo.awk,v
retrieving revision 1.5
diff -u -r1.5 distinfo.awk
--- checksum/distinfo.awk 22 Aug 2018 20:48:36 -0000 1.5
+++ checksum/distinfo.awk 12 May 2024 22:08:52 -0000
@@ -89,6 +89,9 @@
# contents of the existing distinfo file, or
# non-zero otherwise.
#
+# -I input Read the list of distfiles from 'input' instead
+# of the command line.
+#
# -i ignorefile Generate distinfo information to ignore checksum
# verification for ignorefile. If this option is
# given more than once, then generate information
@@ -218,6 +221,12 @@
} else if (option == "-f") {
distinfo = ARGV[ARGSTART + 1]
ARGSTART += 2
+ } else if (option == "-I") {
+ while (getline < ARGV[ARGSTART + 1]) {
+ distfiles[D++] = $0
+ cksumfiles[$0] = 1
+ }
+ ARGSTART += 2
} else if (option == "-i") {
distfiles[D++] = ARGV[ARGSTART + 1]
ignorefiles[ARGV[ARGSTART + 1]] = 1
@@ -231,7 +240,7 @@
} else if (match(option, /^-.*/) != 0) {
option = substr(option, RSTART + 1, RLENGTH)
print self ": unknown option -- " option > "/dev/stderr"
- print "usage: " self " -- [-a alg] [-c file] [-d distdir] [-f distinfo] [-i ignore] [-p alg] [patch ...]" > "/dev/stderr"
+ print "usage: " self " -- [-a alg] [-c file] [-d distdir] [-f distinfo] [-I inputfile] [-i ignore] [-p alg] [patch ...]" > "/dev/stderr"
exit 1
} else {
break
Home |
Main Index |
Thread Index |
Old Index