Bug 949976

Summary: wrong exit codes
Product: [Fedora] Fedora Reporter: Martin Hatina <mhatina>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 18CC: a.badger, mcermak, twoerner, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpmdevtools-8.4-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 07:31:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Hatina 2013-04-09 12:01:59 UTC
Description of problem:

rpminfo returns wrong exit codes even if action was successful.
example:
$ rpminfo --help
Usage: rpminfo [-h] [-v] [-q] [-c] [-e | -l] [-p | -np | -P | -nP | -r]
                 [-s] [-o <file>] {-i | [<rpm package>...]}

  -h  | --help                 print help
  -v  | --verbose              be more verbose (to stderr)
  -q  | --quiet                only list files
  -qq                          really quiet: do not print rpath in split mode
  -i  | --installed            all installed packages
  -e  | --executables          list executables
  -l  | --libraries            list libraries
  -p  | --pic                  list pic
  -np | --no_pic               list no pic
  -P  | --pie                  list pie
  -nP | --no_pie               list no pie
  -r  | --rpath                list files containing rpath
  -ro | --rpath_odd            list files containing odd rpath
  -s  | --split                split output (.pie, .pic, .dso_pic, .rpath..)
                               output must be specified
  -t  | --test                 test for odd rpath
  -o <file> | --output=<file>  output in file <file>
  -T <dir> | --tmp-dir=<dir>   temporary directory

  Default options: -e -l -p -np -P -nP -r -t
$ echo $?
255

Other actions are affected too.

Version-Release number of selected component (if applicable):

  rpmdevtools-8.3-1.fc18.noarch

How reproducible:

  always
  
Actual results:

  exit code is always 255 even if performed action was successful

Expected results:

  exit codes reflect action result (especially is 0 in case of success)

Comment 1 Ville Skyttä 2013-04-09 15:50:47 UTC
Fixed upstream:
   http://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=2dcda15

Comment 2 Fedora Update System 2013-10-07 21:40:19 UTC
rpmdevtools-8.4-1.fc20,devscripts-2.13.4-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rpmdevtools-8.4-1.fc20,devscripts-2.13.4-2.fc20

Comment 3 Fedora Update System 2013-10-09 14:16:39 UTC
rpmdevtools-8.4-1.fc20, devscripts-2.13.4-2.fc20 has been pushed to the Fedora 20 testing repository.

Comment 4 Fedora Update System 2013-10-19 06:51:28 UTC
rpmdevtools-8.4-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rpmdevtools-8.4-2.fc20

Comment 5 Fedora Update System 2013-11-10 07:31:16 UTC
rpmdevtools-8.4-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.