[Toybox] [PATCH] tar: fix tvf for sparse extension headers.
enh
enh at google.com
Mon Sep 16 15:58:11 PDT 2019
...and here's a fix (not including the test).
On Mon, Sep 16, 2019 at 3:22 PM enh <enh at google.com> wrote:
>
> here's the same test rebased on top of my previous test, which was
> committed in the meantime...
>
>
> On Sun, Sep 15, 2019 at 11:01 AM enh <enh at google.com> wrote:
> >
> > (you beat me getting back to this...)
> >
> > On Sun, Sep 15, 2019 at 12:18 AM Rob Landley <rob at landley.net> wrote:
> > >
> > > On 9/13/19 8:17 PM, Rob Landley wrote:
> > > > I think what we need to do is add up the segments. (Which is what I thought it
> > > > _was_ doing, but my head cold has turned into dizzy+headache and I has a tired.)
> > > >
> > > > I can fix this when I feel better if you don't get to it.
> > >
> > > I pushed a patch. It only calls truncate() when it hits a zero length segment
> > > (and only when lseek() didn't fail, so writing to a nonseekable output shouldn't
> > > gratuitously fail at the truncate)
> >
> > (yeah, i hadn't thought about anything other than regular files.)
> >
> > >, and it uses the last offset+length as a
> > > sparse file as the display length.
> > >
> > > I think that fixes it?
> >
> > it fixes extraction, yes. i can confirm that i get the same results
> > for the motivating tar files with GNU and toybox tar now.
> >
> > but if you try the attached patch which adds a test for a sparse file
> > with a hole at the end, it passes with TEST_HOST=1 but fails otherwise
> > because i don't think we're adding the final entry?
> >
> > > Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tar-fix-creation-of-tar-files-containing-sparse-file.patch
Type: text/x-patch
Size: 2827 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190916/ba5197e1/attachment-0003.bin>
More information about the Toybox
mailing list