Running:
$ bzip2 -c </dev/urandom| dd bs=512 count=1 | bzip2 -d >/dev/null
Results in the same error message that's being reported by apt:
-----------------------------------------------------------------
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Invalid argument
Input file = (stdin), output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
-----------------------------------------------------------------
So this bug is probably due to apt somehow feeding incomplete files to
bzip2.
BTW, the possible reason reported by bzip2 seems to be the last errno
it received, from trying
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfc6ab78) = -1 EINVAL (Invalid argument)
before its first read of stdin, or
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfcb5d90) = -1 ENOTTY (Inappropriate ioctl for device)
if it had accumulated enough data to have ouput something on stdout.
--
Rodrigo Gallardo
GPG-Fingerprint: 7C81 E60C 442E 8FBC D975 2F49 0199 8318 ADC9 BC28
Zenophobia: the irrational fear of convergent sequences.
Attachment:
signature.asc
Description: Digital signature