From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 29 10:55:26 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 3FE45106567A; Sun, 29 Aug 2010 10:55:26 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 90AA48FC1D; Sun, 29 Aug 2010 10:55:25 +0000 (UTC) Received: by bwz20 with SMTP id 20so3626165bwz.13 for ; Sun, 29 Aug 2010 03:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=CJoBBpwqUjEC+P8N33L0l9JaDjBj6qHn/6uNS+AlgOA=; b=cqS1P/uulrOfdq9cZZrINF6uGr5t2eG01jOtHZHayei/4WtZGnjOo4aYs+ExvKsTU5 5cuiuyUsU15EGra8pK7baQehm1UuLvrR6J9ruV6grEqalMWVtkdpO5JdXA5SOMpuwo0P n9vTb479jzwqritP9wTUql77xS6GmYMGhWteM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=DFZxham2Y7wgpNOS8ALSJwtvXwm/HpIL8CfRRpKifcEo69y8LxfajM9Xib7GbSTPnY srL0SHZl6BAliKVa6AinudYI/3BhrDNdQd4roOqZ49xwvNo0jumruOesy6wUA+oeFL4i 9lBWlCQd2VDffIjNBphSz1/PnCYuuvNH1nVyQ= MIME-Version: 1.0 Received: by 10.204.100.12 with SMTP id w12mr2136989bkn.90.1283079324724; Sun, 29 Aug 2010 03:55:24 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Sun, 29 Aug 2010 03:55:24 -0700 (PDT) In-Reply-To: References: <201003300830.o2U8U93Y096013@freefall.freebsd.org> <20100331034500.O1425@besplex.bde.org> <20100331060503.G1425@besplex.bde.org> <364299f41003301740m4ca73398v9aadcc87e53a4628@mail.gmail.com> Date: Sun, 29 Aug 2010 03:55:24 -0700 X-Google-Sender-Auth: BRqS1kLk_ZLYgYKiNNTjgQh9W2M Message-ID: From: Garrett Cooper To: Garrett Cooper Content-Type: multipart/mixed; boundary=00163649a0d95e7054048ef42f51 Cc: freebsd-bugs@freebsd.org, Bruce Evans 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: Sun, 29 Aug 2010 10:55:26 -0000 --00163649a0d95e7054048ef42f51 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Aug 29, 2010 at 3:54 AM, Garrett Cooper wrote= : > On Tue, Mar 30, 2010 at 5:40 PM, Garrett Cooper wro= te: >> On Tue, Mar 30, 2010 at 12:12 PM, Bruce Evans wro= te: >>> On Wed, 31 Mar 2010, Bruce Evans wrote: >>> >>>> On Tue, 30 Mar 2010, Garrett Cooper wrote: >>>> >>>>> Hi, >>>>> =A0 =A0I'm not 100% satisfied with this patch now. Looking back it fa= ils >>>>> the following case: >>>>> >>>>> =A0 =A0 -P =A0 =A0Do not follow symbolic links in the file hierarchy,= instead >>>>> con- >>>>> =A0 =A0 =A0 =A0 =A0 sider the symbolic link itself in any comparisons= . =A0This is the >>>>> =A0 =A0 =A0 =A0 =A0 default. >>>> >>>> -P should have the same semantics and description in all utilities. = =A0The >>>> description should not have grammar errors like the above (comma splic= e). >>>> ... >>>> 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. =A0mtree also has -L= , but >>>> not -R or -P or -h. =A0It 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. =A0You would only need to understand the amount of >>> brokenness of -P to see if you need to use lstat(). =A0I think -P is so >>> broken that mtree on symlinks doesn't work at all and not using lstat() >>> would be safest. >> >> Hmmm... so I take it that this is actually the first step in many to >> fixing this underlying problem? I suppose I should be opening bugs for >> all of the itemized issues that you see in mtree(8) so someone can >> submit patches to fix the utility? >> >>> The patch has some style bugs. >> >> Please expound on this -- I want to improve my style (without having >> to rewrite the entire program of course) -- so that it conforms more >> to the projects overall style rules; of course there are some cases >> where I can't readily do that (like pkg_install -- ugh), but I'll do >> my best to make sure that the rules are withheld. > > =A0 =A0Just for the record, here's the latest patch that I submitted to > Bruce for this PR. Dog gone it; attached the wrong patch. This is the right patch.. -Garrett --00163649a0d95e7054048ef42f51 Content-Type: text/plain; charset=US-ASCII; name="bin.144411.diff.txt" Content-Disposition: attachment; filename="bin.144411.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gdfs9v3w1 SW5kZXg6IGV4Y2x1ZGVzLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZXhjbHVkZXMuYwkocmV2aXNpb24gMjEx OTYxKQorKysgZXhjbHVkZXMuYwkod29ya2luZyBjb3B5KQpAQCAtMzAsOSArMzAsMTAgQEAKICNp bmNsdWRlIDxzeXMvY2RlZnMuaD4KIF9fRkJTRElEKCIkRnJlZUJTRCQiKTsKIAorI2luY2x1ZGUg PHN5cy9xdWV1ZS5oPgorI2luY2x1ZGUgPHN5cy9zdGF0Lmg+CisjaW5jbHVkZSA8c3lzL3RpbWUu aD4JCS8qIFhYWCBmb3IgbXRyZWUuaCAqLwogI2luY2x1ZGUgPHN5cy90eXBlcy5oPgotI2luY2x1 ZGUgPHN5cy90aW1lLmg+CQkvKiBYWFggZm9y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