[Toybox] [PATCH] tar: fix tvf for sparse extension headers.
enh
enh at google.com
Sun Sep 15 11:01:19 PDT 2019
(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.test-add-a-test-for-a-sparse-file-with-a-hole-at.patch
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190915/30e3f5a9/attachment-0003.bin>
More information about the Toybox
mailing list