From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 9 03:40:03 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B85A16A421 for ; Fri, 9 Nov 2007 03:40:03 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (bhuda.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id AC44513C494 for ; Fri, 9 Nov 2007 03:40:02 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 73982 invoked from network); 6 Nov 2007 16:53:16 -0000 Received: from unknown (HELO mbook.mired.org) (192.168.195.2) by 0 with SMTP; 6 Nov 2007 16:53:16 -0000 Date: Tue, 6 Nov 2007 11:52:52 -0500 From: Mike Meyer To: "Julian H. Stacey" Message-ID: <20071106115252.1f97af6d@mbook.mired.org> In-Reply-To: <200711061620.lA6GKE8L090019@fire.js.berklix.net> References: <200711050002.lA502KUe064392@fire.js.berklix.net> <20071105085259.A39496@knop-beagle.kn.op.dlr.de> <200711061620.lA6GKE8L090019@fire.js.berklix.net> Organization: Meyer Consulting X-Mailer: Claws Mail 2.10.0 (GTK+ 2.6.10; i386-apple-darwin8.10.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 09 Nov 2007 03:55:21 +0000 Cc: hackers@freebsd.org, Harti Brandt Subject: Re: make: evaluation of symbolic link with ../ fails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 03:40:03 -0000 On Tue, 06 Nov 2007 17:20:14 +0100 "Julian H. Stacey" wrote: > It seems to me that all except csh (including bourne shell !) are > broken !! Amazing ! None of them cope properly actually following > symbolic links, they all make false premise the /some_path/.. == > /some_path ! That's not a bug, that's a feature. When symlinks were introduced in 4.1c (or thereabouts), people were often surprised to do: $ cd /some_path/child $ ... $ cd .. and not wind up in /some_path, or having the ever popular sh loop: $ for dir in $ do $ cd $dir $ ... $ cd .. $ done start working on something totally unrelated to the current directory halfway through the loop. So sh (and etc.) added a feature so that those things worked the way users expected them to. Basically, the shells don't make a false premise that /some_path/.. == /some_path, they make the premise appear to be true as a feature. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.