From nobody@FreeBSD.org  Thu Sep 18 14:50:36 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 18BA11065685
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Sep 2008 14:50:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 048A78FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Sep 2008 14:50:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8IEoZ01087860
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Sep 2008 14:50:35 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m8IEoZvv087859;
	Thu, 18 Sep 2008 14:50:35 GMT
	(envelope-from nobody)
Message-Id: <200809181450.m8IEoZvv087859@www.freebsd.org>
Date: Thu, 18 Sep 2008 14:50:35 GMT
From: Bertrand Yvain <pnl@hithlum.adm.ielo.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: installworld fails if install-info is missing (WITHOUT_INFO=yes)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127471
>Category:       misc
>Synopsis:       [build] [patch] installworld fails if install-info is missing (WITHOUT_INFO=yes)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 18 15:00:10 UTC 2008
>Closed-Date:    Thu Mar 04 19:52:21 UTC 2010
>Last-Modified:  Thu Mar 04 19:52:21 UTC 2010
>Originator:     Bertrand Yvain
>Release:        RELENG_7
>Organization:
IELO
>Environment:
FreeBSD hithlum.adm.ielo.net 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Sep 18 12:33:56 CEST 2008     pnl@hithlum.adm.ielo.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
When using WITHOUT_INFO=yes in src.conf, install-info is removed by make delete-old.

Without this file, make installworld fails around line 597 of src/Makefile.inc1,v 1.588.2.9:

distributeworld installworld: installcheck
        mkdir -p ${INSTALLTMP}
        for prog in [ awk cap_mkdb cat chflags chmod chown \
            date echo egrep find grep install-info \
            ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
            test true uname wc zic; do \
                cp `which $$prog` ${INSTALLTMP}; \
        done
        ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
        rm -rf ${INSTALLTMP}

>How-To-Repeat:
rm /usr/bin/install-info && make installworld
>Fix:
For instance, one could make every program in this loop optional.
See patch file for a suggested fix.

Patch attached with submission follows:

--- Makefile.inc1.orig	2008-09-18 16:40:33.000000000 +0200
+++ Makefile.inc1	2008-09-18 16:46:13.000000000 +0200
@@ -596,10 +596,10 @@
 #
 distributeworld installworld: installcheck
 	mkdir -p ${INSTALLTMP}
-	for prog in [ awk cap_mkdb cat chflags chmod chown \
+	which [ awk cap_mkdb cat chflags chmod chown \
 	    date echo egrep find grep install-info \
 	    ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
-	    test true uname wc zic; do \
+	    test true uname wc zic | while read prog; do \
 		cp `which $$prog` ${INSTALLTMP}; \
 	done
 	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}


>Release-Note:
>Audit-Trail:

From: Bertrand Yvain <pnl@hithlum.adm.ielo.net>
To: bug-followup@FreeBSD.org, pnl@hithlum.adm.ielo.net
Cc:  
Subject: Re: conf/127471: installworld fails if install-info is missing
	(WITHOUT_INFO=yes)
Date: Thu, 18 Sep 2008 17:36:54 +0200

 --h31gzZEtNLTqOjlF
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Suboptimal patch, this one is obviously less stupid.
 
 --h31gzZEtNLTqOjlF
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="patch.txt"
 
 --- Makefile.inc1.orig	2008-09-18 17:34:20.000000000 +0200
 +++ Makefile.inc1	2008-09-18 17:35:24.000000000 +0200
 @@ -596,11 +596,11 @@
  #
  distributeworld installworld: installcheck
  	mkdir -p ${INSTALLTMP}
 -	for prog in [ awk cap_mkdb cat chflags chmod chown \
 +	which [ awk cap_mkdb cat chflags chmod chown \
  	    date echo egrep find grep install-info \
  	    ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
 -	    test true uname wc zic; do \
 -		cp `which $$prog` ${INSTALLTMP}; \
 +	    test true uname wc zic | while read prog; do \
 +		cp $$prog ${INSTALLTMP}; \
  	done
  	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
  	rm -rf ${INSTALLTMP}
 
 --h31gzZEtNLTqOjlF--
State-Changed-From-To: open->closed  
State-Changed-By: brucec 
State-Changed-When: Thu Mar 4 19:51:34 UTC 2010 
State-Changed-Why:  
Fixed in r189764. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127471 
>Unformatted:
