Bug 697193

Summary: installer fails to report missing or corrupt /etc/fedora-release
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: anaconda-maint-list, jonathan, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-16.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-08 23:07:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
screenshot of "Cannot Upgrade" message none

Description Steve Tyler 2011-04-16 17:25:21 UTC
Created attachment 492610 [details]
screenshot of "Cannot Upgrade" message

Description of problem:
The "Cannot Upgrade" message does not tell the user anything more about the "current installation" than that it is "on sda1" (screenshot attached).

Version-Release number of selected component (if applicable):
F15-Beta-Final
anaconda 15.27

How reproducible:
Always.

Steps to Reproduce:
1. Bug 697047, Comment 9
2.
3.
  
Actual results:


Expected results:


Additional info:
Bug 697047 - "Cannot Upgrade" message reinstalling onto VM disk image after cancelled install

Comment 1 Steve Tyler 2011-04-17 05:34:31 UTC
The "Cannot Upgrade" message could say that it is looking for /etc/fedora-release and report what it found, including its contents, if the file is consistent with the RPM database[1].

The F14 Installation Guide explains the significance of /etc/fedora-release:
"If the contents of your /etc/fedora-release file have been changed from the
default, your Fedora installation may not be found when attempting an upgrade
to Fedora 14."
http://docs.fedoraproject.org/en-US/Fedora/14/html-single/Installation_Guide/index.html#ch-upgrade-x86

[1] Bug 697236 - installer fails to detect corrupt /etc/fedora-release

Comment 2 Steve Tyler 2011-04-17 06:43:06 UTC
Retitling now that I have figured out where the installer is going wrong:
"installer fails to report missing or corrupt /etc/fedora-release"

Bug 697047, Comment 10 has a simple reproducer for the missing case -- rename /etc/fedora-release.

Changing the contents of /etc/fedora-release reproduces the corrupt case (Bug 697236).

Comment 3 Brian Lane 2011-04-19 00:02:29 UTC
If the file is missing it is correct to report that it cannot upgrade the install. It should probably say 'Unknown on sda1' instead of leaving it blank.

Comment 4 Steve Tyler 2011-04-19 00:25:15 UTC
(In reply to comment #3)
> If the file is missing it is correct to report that it cannot upgrade the
> install. It should probably say 'Unknown on sda1' instead of leaving it blank.

I believe that it would more informative to explicitly tell the user that the
installer cannot find /etc/fedora-release. Saying 'Unknown on sda1' does not
help the user figure what is going wrong with the install.

A *realistic* scenario for /etc/fedora-release being missing on a Fedora system
is documented in Bug 697047 (install failure or cancellation before
fedora-release package is installed). And if you read through it, you will see
that I had a lot of trouble figuring out what was going wrong with my attempt
to reinstall. The GUI should make it easy to understand that the installer is looking for /etc/fedora-release.

/etc/fedora-release could also be missing because the disk contains a Ubuntu
installation, say. Of course, the Fedora installer does not need to figure out
that it is a Ubuntu disk.

BTW, the F14 Installation Guide has this to say:
"If the contents of your /etc/fedora-release file have been changed from the
default, your Fedora installation may not be found when attempting an upgrade
to Fedora 14."
http://docs.fedoraproject.org/en-US/Fedora/14/html-single/Installation_Guide/index.html#ch-upgrade-x86

Comment 5 Steve Tyler 2011-04-19 01:09:26 UTC
(In reply to comment #4)
...
> BTW, the F14 Installation Guide has this to say:
> "If the contents of your /etc/fedora-release file have been changed from the
> default, your Fedora installation may not be found when attempting an upgrade
> to Fedora 14."
> http://docs.fedoraproject.org/en-US/Fedora/14/html-single/Installation_Guide/index.html#ch-upgrade-x86

Putting something like this sentence into the "Cannot Upgrade" dialog would almost completely address this bug:

"If /etc/fedora-release cannot be found or has changed from the default, an upgrade cannot but be done. By clicking "Continue" you will be able to begin a "Fresh" install."

That doesn't address the wording for the too-old and too-new cases, though ...

Comment 6 Steve Tyler 2011-04-19 01:50:04 UTC
(In reply to comment #3)
> If the file is missing it is correct to report that it cannot upgrade the
> install. It should probably say 'Unknown on sda1' instead of leaving it blank.

'Unknown on sda1'

Just realized you meant that to appear in the list of devices.
That's a good idea.

For example:
'Unknown on sda1'
'Fedora 1 on sdb1'

The explanatory text could read something like this:

'"Unknown" means a device cannot be upgraded because /etc/fedora-release cannot be found on it or the file has changed from the default.'

'By clicking "Continue" you will be able to begin a "Fresh" install on sdXN.'

Comment 7 Steve Tyler 2011-04-19 17:42:59 UTC
Thanks, Brian.

+                    oldInstalls += _("Unknown release on %s") % (info[2])
http://git.fedorahosted.org/git/?p=anaconda.git;a=commitdiff;h=e0008f7c967c820707cac9303af66e8e515c8f54