Bug 189216 - Bad return code when compressing 0 length files
Bad return code when compressing 0 length files
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ncompress (Show other bugs)
4.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
:
Depends On:
Blocks: FAST4.5APPROVED
  Show dependency treegraph
 
Reported: 2006-04-18 09:43 EDT by David Kovalsky
Modified: 2014-03-31 19:43 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0663
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-12 12:47:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
this patch fix both #189215 and #189216 (636 bytes, patch)
2006-04-21 08:05 EDT, Peter Vrabec
no flags Details | Diff

  None (edit)
Description David Kovalsky 2006-04-18 09:43:50 EDT
Description of problem:
Returns different return code when compressing (actually no compression is done
because the -f parameter was not specified) 0 length files then when compressing
(actually not, because the resulting file is larger, see above) small files.
$ touch foo
$ compress foo
$ echo $?
0

$ echo jkl>bar
$ compress bar
$ echo $?
2

$ ll
-rw-r--r--  1 nfsnobody devqa5 4 Apr 13 04:21 bar
-rw-r--r--  1 nfsnobody devqa5 0 Apr 13 04:18 foo

Same behaviour, different return code. When files are not changed (output is
larger than input) then the return code (according to man pages and behavior in
similar cases) should be 2.

Version-Release number of selected component (if applicable):
ncompress-4.2.4-40
ncompress-4.2.4-41.rhel4

How reproducible:
always

Steps to Reproduce:
1.
$ touch foo
$ compress foo
$ echo $?
0


2.
$ echo jkl>bar
$ compress bar
$ echo $?
2

  
Actual results:
0

Expected results:
2

Additional info:
Comment 1 Peter Vrabec 2006-04-21 08:05:38 EDT
Created attachment 128079 [details]
this patch fix both #189215 and #189216
Comment 10 Red Hat Bugzilla 2006-09-12 12:47:17 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0663.html

Note You need to log in before you can comment on or make changes to this bug.