Bug 484198 - ppmfade, ppmrainbow and ppmddumpfont error handling
ppmfade, ppmrainbow and ppmddumpfont error handling
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
Depends On:
  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:
Last Closed: 2009-04-14 06:08:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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):

# 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]
               [-base basename]
Notes: Default base: fade
       The resulting image files will be named fade.NNNN.ppm.
# echo $?

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

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

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 $?

# 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.