Stop passing DISTFILES and MASTER_SITES through command line arguments to avoid reaching ARG_MAX in command lines.
PR: 295029
Differential D59475
Mk/Scripts/do-fetch.sh: read distfiles from stdin to avoid ARG_MAX Authored by mat on Mon, Sep 7, 8:06 AM. Tags None Referenced Files
Subscribers
Details
Stop passing DISTFILES and MASTER_SITES through command line arguments to avoid reaching ARG_MAX in command lines. PR: 295029
Diff Detail
Event TimelineComment Actions I'm not sure this would fix the command line length, it it just moves the length around. . for d in ${DISTFILES}
printf "%s\n" "$d" >> temp
. endforand then pass maybe either pass the tempfile name to do-fetch, or use it as its stdin. Also, there is the same problem for each script that we pass the distfiles to, like makesum. Comment Actions Maybe using \0 instead of \n is better there, and juggling with IFS to split on \0, in case some distfile has a strange file name. Comment Actions yesh I pondered the tempfile, but this was longer, actually, but yes I think you are right, as printf will complain also about the ARG_MAX. Comment Actions I refactored the 3 targets that had the exact same content. It's missing makesum, which will have the same problem. Comment Actions I may have "fixed" makesum, but maybe not, and I do not seem to find a port to test things. |