ignore trailing garbage on decompress needed
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
pbzip2 | Status tracked in Trunk | |||||
| 1.1 |
Low
|
Yavor Nikolov | |||
| 2.0 |
Undecided
|
Unassigned | |||
| Trunk |
Low
|
Yavor Nikolov |
Bug Description
Add option-controlled functionality to ignore trailing garbage on decompression instead of failing with error.
This is in order to keep compatible with bzip2 and to prevent breaking existing code dealing with Gentoo package format.
Changed in pbzip2: | |
assignee: | nobody → Yavor Nikolov (yavor-nikolov) |
status: | New → In Progress |
Yavor Nikolov (yavor-nikolov) wrote : | #1 |
Yavor Nikolov (yavor-nikolov) wrote : | #2 |
An additional suggestion (by Michał) came for the default parameter value:
"switching IgnoreTrailingG
Changed in pbzip2: | |
status: | In Progress → Fix Committed |
Changed in pbzip2: | |
importance: | Undecided → Low |
milestone: | none → 1.1.2 |
Yavor Nikolov (yavor-nikolov) wrote : | #3 |
A bit clarification about the bug and it's current fix: default behavior is still determined by IGNORE_
Yavor Nikolov (yavor-nikolov) wrote : | #4 |
My last update here to be ignored... The program-name based default has been in fact already implemented as per the description in Makefile:
# Comment out CFLAGS line below to explicity set ignore trailing garbage
# default behavior: 0 - disabled; 1 - enabled (ignore garbage by default)
# If IGNORE_
# by program name: bzip2, bunzip2, bzcat - ignore garbage; otherwise - not.
#CFLAGS += -DIGNORE_
Working but still just barely tested implementation has been pushed to lp:~yavor-nikolov/pbzip2/pbzip2-1.1.x-yn-ignore-trailing.
The feature is switched on/off using following option: trailing- garbage= 0 (Old behaviour - trailing garbage causes error and abort) trailing- garbage= 1 (Trailing garbage is just ignored /printing just a warning about it if in verbose mode/) trailing- garbage (Same as --ignore- trailing- garbage= 1)
--ignore-
--ignore-
--ignore-
The default value flag could be specified by conditional compilation with IGNORE_ TRAILING_ GARBAGE= <flag value>. (The default is 0).