Bug 24671

Summary: Upgrading M6.0 official to M7 B3 round 3 does not respect current country
Product: Mageia Reporter: Dick Gevers <dvgevers>
Component: InstallerAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: fri, henk, lewyssmith, mageia, marja11, shybluenight
Version: 7Keywords: 7beta3, PATCH
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: drakx-installer-stage2 CVE:
Status comment:
Attachments: Install of M6.0 bug report dated 20190414
report.bug from upgrade to M7 B3 Round 3 dated 20190415
Patch to cause installer/localedrake to store the country code in /etc/locale.conf
Patch to cause the installer to preserve the existing locale settings on upgrade

Description Dick Gevers 2019-04-15 18:40:29 CEST
Description of problem:

Steps to Reproduce:
* Install on real hardware Mageia 6.0 Official x86_64 classical iso
* Choose language en_GB, country The Netherlands, timezone UTC
* Reboot
* Remove 32 bit media, do NO updates at all.
* Change wireless regulatory domain in advanced settings to NL
* Upgrade with Classical iso Mageia7 Beta3 built 11th April 2019 (round 3)

When arriving at Installer Summary: Country defaults to UK (i.e. along the lines of language en_GB),  user needs to correct the installer to usual country of residence NL.

This should be unchanged in upgrade from the country it was in at the start of the install. Not because the user cannot change it, but because the user expects the machine to have more correct information than the user. Showing a wrong default at this stage makes the user think the machine is stupid ;)

I shall attach report*.bug.xz for both installs.

Version-Release number of selected component (if applicable):
18.12-2
Dick Gevers 2019-04-15 18:41:09 CEST

Keywords: (none) => 7beta3, FOR_ERRATA7
CC: (none) => henk

Comment 1 Dick Gevers 2019-04-15 18:42:44 CEST
Created attachment 10937 [details]
Install of M6.0 bug report dated 20190414
Comment 2 Dick Gevers 2019-04-15 18:43:56 CEST
Created attachment 10938 [details]
report.bug from upgrade to M7 B3 Round 3 dated 20190415
Marja Van Waes 2019-04-15 18:44:45 CEST

CC: (none) => marja11
Assignee: bugsquad => mageiatools

Comment 3 Lewis Smith 2019-04-17 20:25:14 CEST
Using M7beta3 Classic ISO x64 real EFI hardware.
Locale English/GB, language Welsh, timezone Country/City = France/Paris.

I have just done the 6->7 upgrade with a charged 13Gb system, which I brought up-to-date beforehand. It took hours, and there were a few errors necessitating re-launching the upgrade stage, which eventually reached its end. At the summary screen, all the cited elements were still *correct*; and remain so in the upgraded system which I am using.
This is consistent with https://bugs.mageia.org/show_bug.cgi?id=24670#c3.
For us two at least, the reported problem is not manifest.

(In reply to Dick Gevers from comment #0)
> * Remove 32 bit media, do NO updates at all.
This raised an eyebrow, and made me wonder whether it was a factor. It is always stated that the system to upgrade should be up-to-date (at least to the date of the Classic ISO) before doing an upgrade.

P.S. I think bugs 24670 & 24671 could have been posted as one. If there is a problem, it is very probably the same cause.

CC: (none) => lewyssmith

Comment 4 Dick Gevers 2019-04-18 08:59:07 CEST
Replacing part of Bug#652

Assignee: mageiatools => thierry.vignaud

Comment 5 Chris B 2019-04-18 11:51:56 CEST
"* Choose language en_GB, country The Netherlands, timezone UTC"

Dick: why did you choose UTC? UTC afaik is not a timezone but a primary time standard on which countries base their timezone on, and the default MGA installer never offered me UTC in the first place.

CC: (none) => shybluenight

Comment 6 Martin Whitaker 2019-04-18 21:28:36 CEST
I don't think we can fix this one properly, because the country code is not stored in the installed system. The locale code could be used, but there is a one-to-many mapping between locale and country.

We could update the installer to write out the country code, so this bug could be fixed in Mageia 8.

CC: (none) => mageia

Comment 7 Lewis Smith 2019-04-18 23:41:14 CEST
From https://bugs.mageia.org/show_bug.cgi?id=24670#c6
> Tested this in VirtualBox, following Dick's instructions.
> For me the time zone (UTC) was retained,
> although the country/region was set to United Kingdom, as reported [here]
I see from the last line that things looked correct for me because I was *already on UK*; not the case for Dick.

Comment 6 not only confirms Dick's point re country, but says we are stuck with it for the moment.
Implies leave this bug open; so the ERRATA tag is correct.
Comment 8 Martin Whitaker 2019-04-19 01:47:37 CEST
Created attachment 10950 [details]
Patch to cause installer/localedrake to store the country code in /etc/locale.conf
Comment 9 Martin Whitaker 2019-04-19 01:48:29 CEST
Created attachment 10951 [details]
Patch to cause the installer to preserve the existing locale settings on upgrade
Comment 10 Martin Whitaker 2019-04-19 01:56:51 CEST
These two (tested) patches fix this bug, with the caveat that for M6 -> M7 upgrades, the installer will take its best guess of the country, using the primary country associated with the locale set for LC_MONETARY. The country code will be stored in /etc/locale.conf, so future upgrades will be able to show the correct country.

Although the country displayed in the installer Summary screen may not be accurate for M6 -> M7 upgrades, all existing system settings for locale should be preserved correctly - the system doesn't actually know or care what country was selected.

I've also tested the patch attached to bug 24670.

Keywords: (none) => PATCH

Comment 11 Dick Gevers 2019-04-19 04:18:07 CEST
Heroic :)))
Comment 12 Lewis Smith 2019-04-19 21:08:25 CEST
(In reply to Dick Gevers from comment #11)
> Heroic :)))
I quite agree! 
Do you want to retain the ERRATA marker? Perhaps a Release Note reflecting comment 10?

@Martin : Does this win over comment 6, & warrant resolved/fixed? I am unsure of the status of Patches.
Comment 13 Martin Whitaker 2019-04-20 13:10:56 CEST
I don't set a bug to resolved/fixed until the fix is available in the repositories or on an ISO, giving the bug reporter a chance to confirm the fix. Others do differently.

One other thing to mention - the language you select when starting the installer will be used for all the installer dialogues, but the system being upgraded will retain its existing language settings. Hopefully most users will pick the same language, so won't be confused by this.
Comment 14 Dick Gevers 2019-05-24 19:05:32 CEST
The fix is fine for me with 6.0 > 7RC round 3

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 15 Morgan Leijström 2019-06-29 16:08:31 CEST
So can FOR_ERRATA7 be removed?

CC: (none) => fri

Comment 16 Morgan Leijström 2019-06-30 01:18:25 CEST
I guess so.

Keywords: FOR_ERRATA7 => (none)