tar: short read problem in release 1.10.2

Denys Vlasenko vda.linux at googlemail.com
Thu Jun 5 16:18:45 UTC 2008


On Thursday 05 June 2008 18:10, E Robertson wrote:
> On Thu, Jun 5, 2008 at 10:56 AM, Denys Vlasenko
> <vda.linux at googlemail.com> wrote:
> > On Thursday 05 June 2008 17:08, E Robertson wrote:
> >> Hi All,
> >> I did a search on the "tar: short read" error and notice it was
> >> reported several times and fixed but it looks like it's broken again.
> >> I have a U-boot binary image in an archive file and tried to extract
> >> it using the following command:
> >>
> >> #tar -xz -C /tmp -f /tmp/usbstick/IMG_ARCHIVE.gz ./upgrade/uboot.img
> >> tar: short read
> >
> > From the name of it it doesn't seem to be a tar file at all.
> > Can you show "gunzip <IMG_ARCHIVE.gz | hexdump -Cv | head -200"?
> >
> >> # echo $?
> >> 1
> >>
> >> However, the uboot.img has not been extracted. I repeated this several
> >> times with the same result.
> >> I did the same thing on my kernel image and although this was
> >> extracted, the size of the extracted image is less than half the
> >> original size.
> >>
> >> Is this a bug? If not, Is their a solution for this?
> >
> > So far there is insufficient data to know what is it.
> 
> I went back and tried some different formats. I see then if I use
> --format=gnu or oldgnu it works fine.
> I'm not too familiar with the different formats but that did the
> trick. My current tar on the host is version 1.19.
> Does that make sense?
> 
> I'll add the header anyway (no format specified -- still trying to
> find out which is the default):
> 
> 00000000  2e 2f 75 70 67 72 61 64  65 2f 00 00 00 00 00 00  |./images/......|

Hex dump corresponds to "./upgrade/", not "./images/"

It's very strange that you hack your own bug report. What's going on?

Can you send some small tar file (<30kb compressed) which is
not unpacking properly? Or upload it somewhere?
--
vda



More information about the busybox mailing list