pbzip2 -cd sometimes (rarely) truncates data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| pbzip2 |
Medium
|
Yavor Nikolov |
Bug Description
I occasionally get Gentoo binary packages that will not unpack. I am aware of the previous issues with trailing garbage but this appears to be different and--ignore-
If I do 'tar -tvf broken.tar.bz2' it works fine.
If I do 'pbzip2 -d broken.tar.bz2' I get a correct tar file.
However, if I do 'pbzip2 -cd broken.tar.bz2 > broken.tar' I get a tar file that is truncated at 16384 bytes.
I have placed a small (40KB) example file here for testing: https:/
This was tested on version 1.1.12 on a Gentoo Linux system.
When I hit a package file that has this problem it is repeatable with that file. My only solutions when I hit this problem are to either delete and rebuilt the package or to temporarily remove the bzip2>pbzip2 symlink so that portage will use regular bzip2 which is fine with these files.
Related branches
Yavor Nikolov (yavor-nikolov) wrote : | #1 |
Kevin (m-launch3ad-m) wrote : | #2 |
Thanks for testing and confirming.
I wasn't really looking for alternative command lines as I would normally just do a tar -xvf but my problem is that portage is doing something like:
pbzip2 -d -cq broken.tar.bz2 | tar -xp -C /tmp/.... -f -
Which also fails. The >broken.tar syntax was the obvious most simple case that both demonstrated the problem and showed that the data was being truncated at an interesting number of bytes.
Yavor Nikolov (yavor-nikolov) wrote : | #3 |
Hi Kevin,
I just pushed a fix to lp:~pbzip2/pbzip2/bug-1524909-cd-truncates-output-sometimes. Would be great if you can test it. (If it's OK we can proceed with merging and releasing the fix).
Kevin (m-launch3ad-m) wrote : | #4 |
Hello Yavor,
This did fix the problem with the file and more importantly it allowed Gentoo's portage system to merge the binary package correctly.
Thanks for the help.
Changed in pbzip2: | |
status: | New → Fix Committed |
assignee: | nobody → Yavor Nikolov (yavor-nikolov) |
importance: | Undecided → Medium |
milestone: | none → 1.1.13 |
Changed in pbzip2: | |
status: | Fix Committed → Fix Released |
Thanks for reporting that issue. I managed to reproduce it on Ubuntu.
Another way I managed to get a non-truncated tar: pbzip2 -cd < broken.tar.bz2 > broken.tar