From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 30 19:12:32 2010 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DCEF106568E; Tue, 30 Mar 2010 19:12:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id A3F728FC15; Tue, 30 Mar 2010 19:12:31 +0000 (UTC) Received: from besplex.bde.org (c122-106-158-90.carlnfd1.nsw.optusnet.com.au [122.106.158.90]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2UJCQMB023378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Mar 2010 06:12:29 +1100 Date: Wed, 31 Mar 2010 06:12:26 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans In-Reply-To: <20100331034500.O1425@besplex.bde.org> Message-ID: <20100331060503.G1425@besplex.bde.org> References: <201003300830.o2U8U93Y096013@freefall.freebsd.org> <20100331034500.O1425@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@freebsd.org, Garrett Cooper Subject: Re: bin/144411: [patch] mtree(8) doesn't reject non-regular files for -X X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 19:12:32 -0000 On Wed, 31 Mar 2010, Bruce Evans wrote: > On Tue, 30 Mar 2010, Garrett Cooper wrote: > >> Hi, >> I'm not 100% satisfied with this patch now. Looking back it fails >> the following case: >> >> -P Do not follow symbolic links in the file hierarchy, instead con- >> sider the symbolic link itself in any comparisons. This is the >> default. > > -P should have the same semantics and description in all utilities. The > description should not have grammar errors like the above (comma splice). > ... > I now see that the grammar error is from the original version of mtree(1), > and is probably one of the things you don't like. mtree also has -L, but > not -R or -P or -h. It is not clear how any utility that traverses trees > can work without a full complement of -[HLPR] or how any utility that > ... Looking at the actual patch, I now see that it is about a completely different problem. You would only need to understand the amount of brokenness of -P to see if you need to use lstat(). I think -P is so broken that mtree on symlinks doesn't work at all and not using lstat() would be safest. The patch has some style bugs. Bruce