NetBSD Problem Report #31153

From www@netbsd.org  Mon Sep  5 03:06:19 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 8A8DB63B84E; Mon,  5 Sep 2005 03:06:19 +0000 (UTC)
Message-Id: <20050905030619.8A8DB63B84E@narn.netbsd.org>
Date: Mon,  5 Sep 2005 03:06:19 +0000 (UTC)
From: stuart@zeus.com
Reply-To: stuart@zeus.com
To: gnats-bugs@netbsd.org
Subject: mk/scripts/mkreadme needs to handle large file lists more intelligently
X-Send-Pr-Version: www-1.0

>Number:         31153
>Category:       pkg
>Synopsis:       mk/scripts/mkreadme needs to handle large file lists more intelligently
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 05 03:07:00 +0000 2005
>Closed-Date:    Tue Aug 18 08:54:41 +0000 2020
>Last-Modified:  Tue Aug 18 08:54:41 +0000 2020
>Originator:     Stuart Shelton
>Release:        n/a
>Organization:
n/a
>Environment:
IRIX64 octane 6.5 07010238 IP30 mips: IRIX 6.5.28
>Description:
mk/scripts/mkreadme appears to have a couple of problems:

* It ignores an environment or mk.conf setting for $AWK
* In a couple of places it does "grep */*"-type operations, which fail with a "arg list too long" error.

The latter can be easily fixed by using ${FIND} or "for" to break up the list of files into manageable chunks.

As a suggestion for an enhancement, wouldn't it be a good idea to check for the current number of command-line arguments allowed to try to identify OS/installations likely to hit problems?  On IRIX this is "getconf ARG_MAX" - which outputs the number of allowed arguments without and additional characters or spaces.
>How-To-Repeat:
bmake readme
>Fix:

I'd propose something similar to altering line 422 to read:

cat /dev/null > $ipv6
for FILE in */*/Makefile */*/options.mk; do
    ${GREP} -l -e '^BUILD_DEFS.*=.*USE_INET6' -e '^PKG_SUPPORTED_OPTIONS.*=.*inet6' $FILE | ${SED} -e 's;Makefile;;g' -e 's;options.mk;;g' >> $ipv6
done

... and changing lines 451-452 to:

    for d in `${FIND} -type d -maxdepth 2` ; do
        if [ ! -f ${d}/Makefile -a -f ${d}/README.html ]; then

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->asau
Responsible-Changed-By: asau@NetBSD.org
Responsible-Changed-When: Mon, 02 Nov 2009 14:08:48 +0000
Responsible-Changed-Why:
I'll have a look.


Responsible-Changed-From-To: asau->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 13 Jul 2020 20:06:51 +0000
Responsible-Changed-Why:
Reset to role account


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 18 Aug 2020 08:54:41 +0000
State-Changed-Why:
Both issues have been fixed sometime in the past fifteen years, with
changes by spz@ in 2010 and 2015 probably the bulk of it.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.