Bug 1398336 - fedora-upgrade incorrectly thinks we're running under X
Summary: fedora-upgrade incorrectly thinks we're running under X
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-upgrade
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-24 13:29 UTC by Richard W.M. Jones
Modified: 2017-08-08 19:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:20:52 UTC
Type: Bug


Attachments (Terms of Use)

Description Richard W.M. Jones 2016-11-24 13:29:36 UTC
Description of problem:

It says ...

It seems you are running upgrade from XWindows. You should switch to VT,
because of bug in systemd-udev. It may lead to unpredictable things.
See https://www.happyassassin.net/2016/10/04/x-crash-during-fedora-update-when-system-has-hybrid-graphics-and-systemd-udev-is-in-update/

but in fact I'm not.  It's a remote ssh session, in screen.

At least you can easily skip the warning.

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

fedora-upgrade-25.2-1.fc24.noarch

How reproducible:

Only on 1 out of 3 systems I am upgrading.

Steps to Reproduce:
1. Just run fedora-upgrade

Comment 1 Miroslav Suchý 2016-11-24 14:06:35 UTC
The test is:
  if [ "$DISPLAY" != "" ]; then
so it is not super smart test. And yes it may give false positive in case you are running screen or tmux from GUI.

I think it is better to give false positive rather than have false negative.

Do you know of better test?

Comment 2 Richard W.M. Jones 2016-11-24 14:16:52 UTC
If you want "running X locally" then something like:

    if [[ "$DISPLAY" =~ ^: ]]; then ...

Note that is a bash-ism.

Comment 3 Miroslav Suchý 2016-11-25 08:14:55 UTC
But that returns 0 in both cases - when running in and without screen under display manager. 

It will just return false when running over remote ssh. So it is little bit better, but still not ideal.

Comment 4 Richard W.M. Jones 2016-11-25 08:56:06 UTC
(In reply to Miroslav Suchý from comment #3)
> But that returns 0 in both cases - when running in and without screen under
> display manager. 

Well OK but the error message says nothing about it being safe
to run in screen under X, it says you should switch to a VT.

If it's safe to be running in screen or tmux under X, then:

  if [[ "$DISPLAY" =~ ^: ]] && [ -z "$STY" ] && [ -z "$TMUX" ]; then ...

Comment 5 Fedora End Of Life 2017-07-25 23:59:15 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 EOL if it remains open with a Fedora  'version'
of '24'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 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  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

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.

Comment 6 Fedora End Of Life 2017-08-08 19:20:52 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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.