FS#48289 - [glibc] Update overwrites locale.gen with all locales commented

Attached to Project: Arch Linux
Opened by Ng Oon-Ee (ngoonee) - Sunday, 21 February 2016, 15:06 GMT
Last edited by Allan McRae (Allan) - Monday, 22 February 2016, 04:15 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Yesterday a glibc update to 2.23-1 (from 2.22-3) overwrote my /etc/locale.gen. On reboot i3status would crap out[1,2] and ranger would also give me errors[3]. Simple fix was just to uncomment my preferred locale in /etc/locale.gen and re-run the locale generation. I'm adding the error messages below in case users search those terms.

I don't recall previous glibc updates causing this, so not sure what's changed. Not a big issue I think.

[1] - Error message was "error status_command process exited unexpectedly"
[2] - locale would return these errors:-
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
[3] - Error message was "warning unable to set locale expect encoding problems"
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 22 February 2016, 04:15 GMT
Reason for closing:  None
Comment by Earnestly (Earnest) - Sunday, 21 February 2016, 16:32 GMT
;-) *insert facetious comment about using Debian's locale-gen script*
Comment by Allan McRae (Allan) - Sunday, 21 February 2016, 21:32 GMT
I can not replicate on any of my systems.
Comment by Earnestly (Earnest) - Sunday, 21 February 2016, 21:47 GMT
ngoonee: Post the output from post_upgrade() which should be in your pacman.log, I cannot reproduce this either.
Comment by Ng Oon-Ee (ngoonee) - Monday, 22 February 2016, 02:37 GMT
[2016-02-20 23:34] [ALPM] upgraded glibc (2.22-3 -> 2.23-1)
[2016-02-20 23:34] [ALPM-SCRIPTLET] Generating locales...
[2016-02-20 23:34] [ALPM-SCRIPTLET] Generation complete.

That's all I got, it didn't generate anything.

Looking further back in pacman.log, I have something from last October:-

[2015-10-12 07:43] [ALPM] transaction started
[2015-10-12 07:43] [ALPM] upgraded glibc (2.22-3 -> 2.22-4)
[2015-10-12 07:43] [ALPM-SCRIPTLET] bash: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
[2015-10-12 07:43] [ALPM] upgraded postgresql-libs (9.4.4-2 -> 9.4.5-1)
[2015-10-12 07:43] [ALPM] upgraded postgresql (9.4.4-2 -> 9.4.5-1)
[2015-10-12 07:43] [ALPM-SCRIPTLET] bash: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
[2015-10-12 07:43] [ALPM] upgraded python3-aur (2015.10.8-1 -> 2015.10.11-1)
[2015-10-12 07:43] [ALPM-SCRIPTLET] ldconfig: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
[2015-10-12 07:43] [ALPM] transaction completed
[2015-10-12 08:50] [PACMAN] Running 'pacman -U postgresql-libs-9.4.4-2-x86_64.pkg.tar.xz postgresql-9.4.4-2-x86_64.pkg.tar.xz python3-aur-2015.10.8-1-any.pkg.tar.xz'
[2015-10-12 08:50] [ALPM] transaction started
[2015-10-12 08:50] [ALPM] downgraded postgresql-libs (9.4.5-1 -> 9.4.4-2)
[2015-10-12 08:50] [ALPM] downgraded postgresql (9.4.5-1 -> 9.4.4-2)
[2015-10-12 08:50] [ALPM] downgraded python3-aur (2015.10.11-1 -> 2015.10.8-1)
[2015-10-12 08:50] [ALPM] transaction completed
[2015-10-12 08:50] [PACMAN] Running 'pacman -U glibc-2.22-3-x86_64.pkg.tar.xz'
[2015-10-12 08:50] [ALPM] transaction started
[2015-10-12 08:50] [ALPM] downgraded glibc (2.22-4 -> 2.22-3)
[2015-10-12 08:50] [ALPM] transaction completed
Comment by Allan McRae (Allan) - Monday, 22 February 2016, 02:43 GMT
My guess... you manually extract glibc-2.22-3 in October to fix that glibc update that was bad. This overwrite your locale-gen with the default and glibc/locales were not updated until the current release.
Comment by Ng Oon-Ee (ngoonee) - Monday, 22 February 2016, 02:59 GMT
That would mean -U behaves differently somehow? Yes now that you mention it I do remember a glibc issue back then.
Comment by Allan McRae (Allan) - Monday, 22 February 2016, 03:01 GMT
You need to rescue the system before you could -U. I used tar -x and the old package from my cache.
Comment by Ng Oon-Ee (ngoonee) - Monday, 22 February 2016, 04:07 GMT
I honestly can't remember the details of what happened back then, it wasn't too big of a hassle, but what you described makes sense. Hence locale-gen was not run on the downgrade, which is why I did not observe this problem till this new update.

It's obviously a corner case though, I don't think many were hit by the bad update previously. This can be closed, then.

Loading...