bzcmp and bzdiff have issues when passing their arguments to the underline cmp and diff commands, issues that are not present in the original script
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bzip2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Package's information:
$ apt-cache show bzip2
Package: bzip2
Architecture: amd64
Version: 1.0.8-2
Multi-Arch: foreign
Priority: important
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-
Bugs: https:/
Installed-Size: 195
Depends: libbz2-1.0 (= 1.0.8-2), libc6 (>= 2.14)
Suggests: bzip2-doc
Replaces: libbz2 (<< 0.9.5d-3)
Filename: pool/main/
Size: 34064
MD5sum: 63ab63d6739fdda
SHA1: 16dde6d0b0c0d96
SHA256: 9201778f5a3bd4f
Homepage: https:/
Description: high-quality block-sorting file compressor - utilities
Description-md5: 1e71313ce794d3d
Task: minimal
Build-Essential: yes
Test data:
$ echo file content > f1 && echo filx content > f2
$ bzip2 f1 f2
Other setup:
$ git clone https:/
$ ln -nv ./bzip2/bzdiff bzcmp
$ chmod u+x ./bzcmp
In regards to bzcmp, this is a very simple way to check for the issue:
# ubuntu's
$ bzcmp f1.bz2 f2.bz2
cmp: invalid --ignore-initial value '/tmp/bzdiff.
cmp: Try 'cmp --help' for more information.
# original's (https:/
$ ./bzcmp f1.bz2 f2.bz2
- /tmp/bzdiff.
In regard to bzdiff, this is a very simple way to check for the issue:
# ubuntu's
$ bzdiff -y -W20 f1.bz2 f2.bz2
diff: invalid option -- ' '
diff: Try 'diff --help' for more information.
# original's (https:/
$ bash bzip2/bzdiff -y -W20 f1.bz2 f2.bz2
file | filx
I think the culprit is the /usr/bin/bzdiff script. Here the difference between ubuntu's and the original one
$ diff -W150 --suppress-
27,31c27
< -*) if test -z "$OPTIONS"; then
< OPTIONS="$ARG"
< else
< OPTIONS="$OPTIONS $ARG"
< fi ;;
---
> -*) OPTIONS="$OPTIONS $ARG";;
43a40,43
> tmp=`mktemp ${TMPDIR:
> echo 'cannot create a temporary file' >&2
> exit 1
> }
56,61c56,57
< tmp=`mktemp "${TMPDIR:
< echo 'cannot create a temporary file' >&2
< exit 1
< }
< bzip2 -cdfq "$2" > "$tmp"
< bzip2 -cdfq "$1" | $comp "$OPTIONS" - "$tmp"
---
> bzip2 -cdfq "$2" > $tmp
> bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
63c59
< /bin/rm -f "$tmp";;
---
> /bin/rm -f $tmp;;
75a72
> exit "$STAT"
80d76
< exit "$STAT"
description: | updated |
description: | updated |
description: | updated |
description: | updated |