Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #61669
| From | Antonio Diaz Diaz <antonio@gnu.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#903931: Maybe trailing garbage or data in an unsupported format is causing the problem? |
| Date | 2018-07-30 00:50 +0200 |
| Message-ID | <wh2FH-808-3@gated-at.bofh.it> (permalink) |
| References | <wcii6-89r-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
Note in the code below that by using a multi-format zcat, other data not
in one of the formats supported by the zcat used may be no longer
ignored but passed to cpio (possibly compressed), which may be the cause
of the problem.
Using the compressors directly to test the format (without *zcat
wrappers) guarantees that the "other data" is indeed ignored.
if zcat -t "$archive" >/dev/null 2>&1 ; then
zcat "$archive"
elif xzcat -t "$archive" >/dev/null 2>&1 ; then
xzcat "$archive"
elif lz4cat -t "$archive" >/dev/null 2>&1 ; then
lz4cat "$archive"
elif bzip2 -t "$archive" >/dev/null 2>&1 ; then
bzip2 -c -d "$archive"
elif lzop -t "$archive" >/dev/null 2>&1 ; then
lzop -c -d "$archive"
# Ignoring other data, which may be garbage at the end of the file
fi | (
if [ -n "$dir" ]; then
mkdir -p -- "$dir"
cd -- "$dir"
fi
cpio "$@"
)
Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#903931: [initramfs-tools-core] unmkinitramfs uses "-t" for zcat like it was a "test integrity" option (it's not and it causes crashes) john terragon <terragonjohn@yahoo.com> - 2018-07-16 22:30 +0200 Processed: Re: [initramfs-tools-core] unmkinitramfs uses "-t" for zcat like it was a "test integrity" option (it's not and it causes crashes) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-07-18 07:10 +0200 Bug#903931: [initramfs-tools-core] unmkinitramfs uses "-t" for zcat like it was a "test integrity" option (it's not and it causes crashes) Ben Hutchings <ben@decadent.org.uk> - 2018-07-18 07:10 +0200 Bug#903931: Neither zcat nor xzcat should be used in scripts Antonio Diaz Diaz <antonio@gnu.org> - 2018-07-27 09:50 +0200 Bug#903931: Maybe trailing garbage or data in an unsupported format is causing the problem? Antonio Diaz Diaz <antonio@gnu.org> - 2018-07-30 00:50 +0200
csiph-web