[Toybox] [PATCH] tar: fix tvf for sparse extension headers.

enh enh at google.com
Tue Sep 17 16:38:36 PDT 2019


ping? (you submitted the test, but not the fix :-) )

On Mon, Sep 16, 2019 at 3:58 PM enh <enh at google.com> wrote:
>
> ...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



More information about the Toybox mailing list