Bug 629745 - preupgrade exit status should reflect failure
preupgrade exit status should reflect failure
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: preupgrade (Show other bugs)
16
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-02 16:31 EDT by Eric Blake
Modified: 2013-02-13 19:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-13 19:48:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Eric Blake 2010-09-02 16:31:03 EDT
Description of problem:
Exit status of preupgrade should be non-zero if it could not run.

Version-Release number of selected component (if applicable):
preupgrade-1.1.7-0.20.20100902git.fc13.noarch (fedora test day version)
[but reproduced on stock F13 preupgrade-1.1.4-1.fc13.noarch]

How reproducible:
100%

Steps to Reproduce:
1. as non-root, type 'preupgrade' in a shell
2. at the prompt for root password, hit 'Cancel'
3. at the shell, type 'echo $?'
4. repeat steps 1 and 2, but type root password; or run as root
5. at the "Upgrade your system" opening prompt, hit 'Cancel'
6. at the shell, type 'echo $?'
  
Actual results:
steps 3. and 6. both report 0 - meaning that preupgrade claims to be successful

Expected results:
non-zero results, both times.  In step 3, the tool couldn't even run due to missing credentials; in step 6, the user explicitly cancelled the operation.  Whether they both give the same status, or whether you want to distinguish between missing credentials and user cancellation, is up to you.  But exit status 0 should be reserved for when preupgrade ran to completion.

Additional info:
Comment 1 Eric Blake 2010-09-02 17:33:06 EDT
At least running 'preupgrade' in a tty outside of X properly fails, although it is rather noisy:

# preupgrade
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 53, in <module>
    import gtk
  File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py, line 64, in <module>
    _init()
  File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py, line 52, in _init
    _gtk.init_check()
RuntimeError: could not open display
# echo $?
1
Comment 2 Eric Blake 2010-09-03 08:04:53 EDT
preupgrade-cli has a similar issue.  Interestingly, when I run preupgrade-cli within an X session terminal as non-root, and hit cancel on the root password gui, the exit status was 0; but when I ran preupgrade-cli from a non-X tty as non-root, and mistyped the root password three times in a row, the exit status was 1.
Comment 3 Bug Zapper 2011-05-31 10:39:59 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Eric Blake 2011-05-31 10:57:58 EDT
retargetting to F15 - the bug is still present in:

preupgrade-1.1.9-1.fc15.noarch
Comment 5 Fedora End Of Life 2013-01-16 17:11:48 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Fedora End Of Life 2013-02-13 19:48:41 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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