ports/52765: [PATCH] Uncompressing manual pages may fail due too "arg list too long"

Jens Schweikhardt schweikh at schweikhardt.net
Wed May 28 18:30:04 UTC 2003


>Number:         52765
>Category:       ports
>Synopsis:       [PATCH] Uncompressing manual pages may fail due too "arg list too long"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 28 11:30:02 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jens Schweikhardt
>Release:        FreeBSD 5.1-BETA i386
>Organization:
FreeBSD.org
>Environment:
System: FreeBSD hal9000.schweikhardt.net 5.1-BETA FreeBSD 5.1-BETA #0: Wed May 21 20:30:29 CEST 2003 toor at hal9000.schweikhardt.net:/usr/obj/share/src/HEAD/sys/HAL9000 i386



>Description:
    If NOMANCOMPRESS is set (say in /etc/make.conf), some ports
    may fail to 'make install' because of a maxed out arglist.
>How-To-Repeat:
    1. Define NOMANCOMPRESS in /etc/make.conf
    2. cd /usr/ports/x11/XFree86-4-manuals
    3. make install

    [...]
    ===>   Uncompressing manual pages for XFree86-4-manuals
    This fails with "/bin/sh: arg list too long"

>Fix:

Do not assign a long list of file names to a shell variable but rather
iterate over all files within make(1), e.g. with this patch.

PS: If you try this patch with XFree86-4-manuals you will see a bunch of
error messages along the line of

/usr/X11R6/man//man3/BlackPixel.3.gz: No such file or directory

This is due to another bug in the NOMANCOMPRESS case. BlackPixel.3.gz is
a symlink to AllPlanes.3.gz which in the meantime has been uncompressed
and is called AllPlanes.3 - but the symlink name has not been renamed
accordingly.

The 'make install' however will get through.

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.451
diff -u -r1.451 bsd.port.mk
--- bsd.port.mk	26 May 2003 20:59:12 -0000	1.451
+++ bsd.port.mk	28 May 2003 18:05:46 -0000
@@ -4081,10 +4081,14 @@
 .if defined(_MANPAGES) || defined(_MLINKS)
 .if ${MANCOMPRESSED} == yes && defined(NOMANCOMPRESS)
 	@${ECHO_MSG} "===>   Uncompressing manual pages for ${PKGNAME}"
-	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE}
+.for _manpage in ${_MANPAGES:S/'/'\''/g}
+	@( eval ${GUNZIP_CMD} ${_manpage} ) || ${TRUE}
+.endfor
 .elif ${MANCOMPRESSED} == no && !defined(NOMANCOMPRESS)
 	@${ECHO_MSG} "===>   Compressing manual pages for ${PKGNAME}"
-	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE}
+.for _manpage in ${_MANPAGES:S/'/'\''/g}
+	@( eval ${GZIP_CMD} ${_manpage} ) || ${TRUE}
+.endfor
 .endif
 .if defined(_MLINKS)
 	@set ${_MLINKS:S,"",,g:S,//,/,g}; \

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list