Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 2010 19:01:22 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Garrett Cooper <gcooper@freebsd.org>
Cc:        freebsd-bugs@freebsd.org, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: bin/144411: [patch] mtree(8) doesn't reject non-regular files for -X
Message-ID:  <AANLkTik6CZKgDsuxoVcyqd9RC3eyFSv2ZV4BsNK7URgP@mail.gmail.com>
In-Reply-To: <AANLkTi=%2Bse=VDaBrg=X7VVLDqk1-DmFRTCVomH7in8-j@mail.gmail.com>
References:  <201003300830.o2U8U93Y096013@freefall.freebsd.org> <20100331034500.O1425@besplex.bde.org> <20100331060503.G1425@besplex.bde.org> <364299f41003301740m4ca73398v9aadcc87e53a4628@mail.gmail.com> <AANLkTi=C7nshKdKWdhTL7qK2dm=o3M83NyyfF6UHFVe9@mail.gmail.com> <AANLkTi=%2Bse=VDaBrg=X7VVLDqk1-DmFRTCVomH7in8-j@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00221532cc9caa8ea704924dbcae
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 29, 2010 at 3:55 AM, Garrett Cooper <gcooper@freebsd.org> wrote=
:
> On Sun, Aug 29, 2010 at 3:54 AM, Garrett Cooper <gcooper@freebsd.org> wro=
te:
>> On Tue, Mar 30, 2010 at 5:40 PM, Garrett Cooper <gcooper@freebsd.org> wr=
ote:
>>> On Tue, Mar 30, 2010 at 12:12 PM, Bruce Evans <brde@optusnet.com.au> wr=
ote:
>>>> 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 f=
ails
>>>>>> 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 comparison=
s. =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 spli=
ce).
>>>>> ...
>>>>> I now see that the grammar error is from the original version of mtre=
e(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 s=
o
>>>> 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..

    I've been sitting on this PR for a while and I'd like to wrap it
up and move on, if that's ok. Here's a patch with a more suitable
comment above the stat(2) call.
Thanks!
-Garrett

--00221532cc9caa8ea704924dbcae
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_gf4p3ge01

SW5kZXg6IHVzci5zYmluL210cmVlL2V4Y2x1ZGVzLmMKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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AwKQorCQllcnIoRVhJVF9GQUlMVVJFLCAic3RhdDog
JXMiLCBuYW1lKTsKKwlpZiAoIVNfSVNSRUcoZXhjbHVkZV9zdGF0LnN0X21vZGUpKQorCQllcnJ4
KEVYSVRfRkFJTFVSRSwgImludmFsaWQgZXhjbHVkZSBmaWxlOiAlcyIsIG5hbWUpOworCiAJZnAg
PSBmb3BlbihuYW1lLCAiciIpOwogCWlmIChmcCA9PSAwKQogCQllcnIoMSwgIiVzIiwgbmFtZSk7
Cg==
--00221532cc9caa8ea704924dbcae--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik6CZKgDsuxoVcyqd9RC3eyFSv2ZV4BsNK7URgP>