From owner-freebsd-bugs Sat May 25 4: 0:42 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3606337B40C for ; Sat, 25 May 2002 04:00:07 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4PB07B37008; Sat, 25 May 2002 04:00:07 -0700 (PDT) (envelope-from gnats) Received: from kartoffel.salatschuessel.net (pD95207C7.dip.t-dialin.net [217.82.7.199]) by hub.freebsd.org (Postfix) with ESMTP id 9F9B537B404 for ; Sat, 25 May 2002 03:53:45 -0700 (PDT) Received: (from olivleh1@localhost) by kartoffel.salatschuessel.net (8.11.6/8.11.5) id g4PArfm50135; Sat, 25 May 2002 12:53:41 +0200 (CEST) (envelope-from olivleh1) Message-Id: <200205251053.g4PArfm50135@kartoffel.salatschuessel.net> Date: Sat, 25 May 2002 12:53:41 +0200 (CEST) From: Oliver Lehmann Reply-To: Oliver Lehmann To: FreeBSD-gnats-submit@FreeBSD.org Cc: Oliver Lehmann X-Send-Pr-Version: 3.113 Subject: misc/38538: make buildworld fails if you have an empty directory Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 38538 >Category: misc >Synopsis: make buildworld fails if you have an empty directory >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 25 04:00:06 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Oliver Lehmann >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD kartoffel.salatschuessel.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Feb 10 22:28:35 CET 2002 olivleh1@bert.sesamestreet.net:/usr/obj/i386/usr/src/sys/SINA i386 >Description: I just removed everything which lies under /usr/obj. Then i ran the following commands in /usr/src make clean make cleandepend find ./ -name "*.o" |xargs rm (make world is creating object files under /usr/src. These fact prohibits using the same repository on another architecture.) Now i ran make buildworld und it stops at: cc -O -pipe -static -o yacc closure.o error.o lalr.o lr0.o main.o mkpar.o o utput.o reader.o skeleton.o symtab.o verbose.o warshall.o sh /usr/src/tools/install.sh -c -o root -g wheel -m 555 yyfix.sh /usr/obj/i3 86/usr/bin/yyfix install: /usr/obj/i386/usr/bin/yyfix: No such file or directory *** Error code 71 Stop in /usr/src/usr.bin/yacc. There are no directories created before install.sh is called. Thats why install is predicted to fail. >How-To-Repeat: just remove /usr/obj/* and run make buildworld in /usr/src >Fix: Fix the Makefiles i created a patch, but it does not work for all cases. it works for: install sourcefile1 sourcefile2 sourcefilen directory install sourcefile directory/ install sourcefile targetfile but it dows not work for e.g.: sh /usr/src/tools/install.sh -c -s -o root -g wheel -m 555 size /usr/obj/i386/usr/libexec/elf because, install.sh take the "targt-directory" (/usr/obj/i386/usr/libexec/elf) as a "target file" (there is no / at the end of the directory). --- install.sh.orig Wed Aug 8 09:42:21 2001 +++ install.sh Sat May 25 11:52:48 2002 @@ -39,4 +39,14 @@ done # the remaining arguments are assumed to be files/dirs only. +if [ $# -gt 2 ] ; then + dir=$(echo $* | sed 's/.* //g') +else + dir=$(echo $* | sed 's/.* \(.*\)\/.*/\1/g') +fi + +if [ ! -d "$dir" ] ; then + mkdir -p $dir +fi + exec install -p $* >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message