[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] bug: combining --recursive-unlink with --directory
From: |
Nathan Stratton Treadway |
Subject: |
Re: [Bug-tar] bug: combining --recursive-unlink with --directory |
Date: |
Fri, 21 Mar 2014 23:12:15 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Mar 17, 2014 at 10:09:37 +0100, Pavel Raiskup wrote:
> On Wednesday, March 12, 2014 14:29:50 David Lowe wrote:
> > Howdy folks,
> >
> > We've come across a bug when combining --recursive-unlink with
> > --directory... namely, that --recursive-unlink doesn't work anymore!
> > I'll demonstrate:
>
> Thanks for the report, this issue seem to be fixed in tar's git from
> commit 738fb9c and up:
>
> commit 738fb9c2f44eee567bb60e22dc011bdfd2f362a8 (refs/bisect/bad)
> Author: Sergey Poznyakoff <address@hidden>
> AuthorDate: Sun Sep 15 10:13:45 2013 +0300
>
> Take into account chdir_fd when extracting from incremental dumps.
Yes, between that commit a few later ones (e.g. b41b004) all the calls
to plain "chdir" were removed (and calls like "unlink" were replaced
with "unlinkat", etc.).
So, David, the short answer is that although I don't know that anyone
was specifically looking at the --recursive-link option, there's a good
chance this was fixed in tar 1.27. (And in fact when I tried your
example script using v1.27.1, the --recursive-unlink --directory command
successfully purged the "bar" directory rather than exiting with an
error.)
> Could we install upstream testcase for recursive unlink? Possible patch
> attached.
Yeah, that's a good idea, since there aren't currently any tests at all
using --recursive-unlink.
I wonder, though, if it would be better to have two separate test
cases, one for --recursive-unlink alone and the other for
--recursive-unlink combined with --directory?
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - address@hidden - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239