Bug 484198 - ppmfade, ppmrainbow and ppmddumpfont error handling
ppmfade, ppmrainbow and ppmddumpfont error handling
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-05 07:02 EST by Petr Šplíchal
Modified: 2016-05-31 21:37 EDT (History)
3 users (show)

See Also:
Fixed In Version: 10.35.62
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-14 06:08:39 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)

  None (edit)
Description Petr Šplíchal 2009-02-05 07:02:38 EST
Description of problem:
ppmfade, ppmrainbow and ppmddumpfont should correctly handle cases when no
input file or arguments are provided by the user.

Version-Release number of selected component (if applicable):
netpbm-progs-10.35.59-1.fc11.i386
netpbm-10.35.59-1.fc11.i386


ppmfade
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ppmfade
main::usage() called too early to check prototype at /usr/bin/ppmfade line 40.
main::usage() called too early to check prototype at /usr/bin/ppmfade line 82.
Usage: ppmfade [-f first_file] [-l last_file]
               [-spread|-relief|-oil|-edge|-bentley|-block]
               [-base basename]
Notes: Default base: fade
       The resulting image files will be named fade.NNNN.ppm.
# echo $?
100

There is a bug in calling the usage() function too early and I suppose the
return code should be 1 here.


ppmrainbow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ppmrainbow 
You must specify at least one color as an argument at /usr/bin/ppmrainbow line 29.
# echo $?
255

To be consistent with the rest of the tools ppmrainbow should report a "1" as
the exit code when command is called in unexpected way. Reporting 255 makes a
confusion with more "serious" errors such as the following one on RHEL:

# ppmshadow
Global symbol "$ourtmp" requires explicit package name at /usr/bin/ppmshadow line 244.
Execution of /usr/bin/ppmshadow aborted due to compilation errors.
# echo $?
255


ppmddumpfont
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ppmddumpfont </dev/null
ppmddumpfont:     (null) -1 -1
ppmddumpfont:     (null) -1 -1
ppmddumpfont:     (null) -1 -1
... (about 60 000 lines)

The tool should not flood the user with thousands of error lines but report
an error/usage message instead.
Comment 1 Jindrich Novy 2009-04-14 06:08:39 EDT
All of it is now fixed in rawhide.

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