Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2010 03:55:24 -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:  <AANLkTi=%2Bse=VDaBrg=X7VVLDqk1-DmFRTCVomH7in8-j@mail.gmail.com>
In-Reply-To: <AANLkTi=C7nshKdKWdhTL7qK2dm=o3M83NyyfF6UHFVe9@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>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <gcooper@freebsd.org> wrote=
:
> On Tue, Mar 30, 2010 at 5:40 PM, Garrett Cooper <gcooper@freebsd.org> wro=
te:
>> On Tue, Mar 30, 2010 at 12:12 PM, Bruce Evans <brde@optusnet.com.au> 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+CisjaW5jbHV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