* glibc-utf8-locales
@ 2022-03-08 9:59 Simon Josefsson via
2022-03-08 10:28 ` glibc-utf8-locales Tobias Geerinckx-Rice
0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson via @ 2022-03-08 9:59 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 2455 bytes --]
Hi. Reconfiguring my machine lately fails with:
root@hamster ~# guix system reconfigure /etc/config.scm
guix system: error: glibc-utf8-locales: unknown package
guix system: error: failed to load '/etc/config.scm':
srfi/srfi-1.scm:586:17: In procedure map1:
Throw to key `quit' with args `(1)'.
root@hamster ~#
I noticed the following commmit:
https://lists.gnu.org/archive/html/guix-commits/2022-02/msg01204.html
First, I wonder if this is optimal. There must be many machines
(servers and embedded) where having all locales installed on is
wasteful, but where it is useful to have the C.UTF-8 and/or en_US.UTF-8
installed, to get minimal working UTF-8 support. Making this hard to
achieve for users seems unhelpful to me. I understand the motivation
for the patch, so I don't think it is necessarily wrong, just that
something more would also be useful. Maybe it is just the documentation
part that could be improved).
Trying to follow its advice, I modified my config.scm [1] as follows:
(use-modules (gnu packages base)) ; make-glibc-utf8-locales
...
(define my-glibc-locales
(make-glibc-utf8-locales
glibc
#:locales (list "en_US" "sv_SE")
#:name "glibc-useful-swedish-utf8-locales"))
...
(operating-system
...
(packages (append (map specification->package
'("glibc-useful-swedish-utf8-locales"
...
Thus letting "glibc-useful-swedish-utf8-locales" replace my earlier use
of "glibc-utf8-locales" in that package list stanza (which worked
happily for me for a long time). However it results in the following
error:
root@hamster ~# guix system reconfigure /etc/config.scm
guix system: error: glibc-useful-swedish-utf8-locales: unknown package
guix system: error: failed to load '/etc/config.scm':
srfi/srfi-1.scm:586:17: In procedure map1:
Throw to key `quit' with args `(1)'.
root@hamster ~#
I tried changing the definition into:
(define glibc-useful-swedish-utf8-locales
(make-glibc-utf8-locales
glibc
#:locales (list "en_US" "sv_SE")
#:name "glibc-useful-swedish-utf8-locales"))
and even trying
(make-glibc-utf8-locales
glibc
#:locales (list "en_US" "sv_SE")
#:name "glibc-useful-swedish-utf8-locales")
to prove that I'm clearly not understanding what I'm doing, however, it
still doesn't work.
Help?
/Simon
[1] https://gitlab.com/jas/sjd-cosmos/-/blob/master/hamster.josefsson.org/overlay/etc/config.scm
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: glibc-utf8-locales
2022-03-08 9:59 glibc-utf8-locales Simon Josefsson via
@ 2022-03-08 10:28 ` Tobias Geerinckx-Rice
2022-03-08 15:02 ` glibc-utf8-locales Simon Josefsson via
0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-03-08 10:28 UTC (permalink / raw)
To: Simon Josefsson, Simon Josefsson via, help-guix
Hullo Simon,
Simon Josefsson via <help-guix@gnu.org> wrote:
>First, I wonder if this is optimal. There must be many machines
>(servers and embedded) where having all locales installed on is
>wasteful, but where it is useful to have the C.UTF-8 and/or en_US.UTF-8
>installed, to get minimal working UTF-8 support. Making this hard to
>achieve for users seems unhelpful to me. I understand the motivation
>for the patch
I don't think you do, if that's what you thought it was ;-)
> (packages (append (map specification->package
> '("glibc-useful-swedish-utf8-locales"
You have a (probably left-over) specification->package call but no "glibc-useful-swedish-utf8-locales" package in Guix for it to find. It does not search the environment.
Remove the spec and refer to your custom variable directly, e.g.:
(packages (append (list glibc-useful-swedish-utf8-locales ...) ...))
Kind regards,
T G-R
Sent on the go. Excuse or enjoy my brevity.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: glibc-utf8-locales
2022-03-08 10:28 ` glibc-utf8-locales Tobias Geerinckx-Rice
@ 2022-03-08 15:02 ` Simon Josefsson via
2022-03-09 16:41 ` glibc-utf8-locales Philip McGrath
0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson via @ 2022-03-08 15:02 UTC (permalink / raw)
To: Tobias Geerinckx-Rice, help-guix
[-- Attachment #1: Type: text/plain, Size: 2500 bytes --]
tis 2022-03-08 klockan 10:28 +0000 skrev Tobias Geerinckx-Rice:
> Hullo Simon,
>
> Simon Josefsson via <help-guix@gnu.org> wrote:
> > First, I wonder if this is optimal. There must be many machines
> > (servers and embedded) where having all locales installed on is
> > wasteful, but where it is useful to have the C.UTF-8 and/or
> > en_US.UTF-8
> > installed, to get minimal working UTF-8 support. Making this hard
> > to
> > achieve for users seems unhelpful to me. I understand the
> > motivation
> > for the patch
>
> I don't think you do, if that's what you thought it was ;-)
Sorry I was unclear -- I reckon the motivation for the patch was that
the semantics with the old glibc-utf8-locales package was confusing
(not containing all UTF-8 locales). Still, I think the old package did
provide some useful aspect which is now lost, and has to be worked
around with more complex logic. Offering a newer more simple solution
is what I'm asking for. Meanwhile I'm happy to use the more complex
solution that you helped me with (below).
> > (append (map specification->package
> > '("glibc-useful-swedish-utf8-locales"
>
> You have a (probably left-over) specification->package call but no
> "glibc-useful-swedish-utf8-locales" package in Guix for it to find.
> It does not search the environment.
>
> Remove the spec and refer to your custom variable directly, e.g.:
>
> (packages (append (list glibc-useful-swedish-utf8-locales ...)
> ...))
Thanks, I managed to get it to work now:
https://gitlab.com/jas/sjd-cosmos/-/blob/master/hamster.josefsson.org/overlay/etc/config.scm
https://gitlab.com/jas/sjd-cosmos/-/commit/cecbdf4ad834c3d06e1344d843582ac1defa935b
However, I'm not sure it is fully working, 'locale -a' gives me more
than just the locales I specified?! Yes I did successful 'system
reconfigure' and reboot into new system.
/Simon
root@hamster ~# /gnu/store/2fk1gz2s7ppdicynscra9b19byrrr866-glibc-
2.33/bin/locale -a
C
ca_ES.utf8
cs_CZ.utf8
da_DK.utf8
de_DE.utf8
el_GR.utf8
en_AU.utf8
en_CA.utf8
en_GB.utf8
en_US.utf8
en_US.UTF-8
es_AR.utf8
es_CL.utf8
es_ES.utf8
es_MX.utf8
fi_FI.utf8
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
ga_IE.utf8
it_IT.utf8
ja_JP.utf8
ko_KR.utf8
nb_NO.utf8
nl_NL.utf8
pl_PL.utf8
POSIX
pt_PT.utf8
ro_RO.utf8
ru_RU.utf8
sv_SE.utf8
tr_TR.utf8
uk_UA.utf8
vi_VN.utf8
zh_CN.utf8
root@hamster ~#
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: glibc-utf8-locales
2022-03-08 15:02 ` glibc-utf8-locales Simon Josefsson via
@ 2022-03-09 16:41 ` Philip McGrath
0 siblings, 0 replies; 4+ messages in thread
From: Philip McGrath @ 2022-03-09 16:41 UTC (permalink / raw)
To: Tobias Geerinckx-Rice, help-guix; +Cc: Simon Josefsson
Hi,
On Tuesday, March 8, 2022 10:02:25 AM EST Simon Josefsson via wrote:
> tis 2022-03-08 klockan 10:28 +0000 skrev Tobias Geerinckx-Rice:
> > Hullo Simon,
> >
> > Simon Josefsson via <help-guix@gnu.org> wrote:
> > > First, I wonder if this is optimal. There must be many machines
> > > (servers and embedded) where having all locales installed on is
> > > wasteful, but where it is useful to have the C.UTF-8 and/or
> > > en_US.UTF-8
> > > installed, to get minimal working UTF-8 support. Making this hard
> > > to
> > > achieve for users seems unhelpful to me. I understand the
> > > motivation
> > > for the patch
> >
> > I don't think you do, if that's what you thought it was ;-)
>
> Sorry I was unclear -- I reckon the motivation for the patch was that
> the semantics with the old glibc-utf8-locales package was confusing
> (not containing all UTF-8 locales). Still, I think the old package did
> provide some useful aspect which is now lost, and has to be worked
> around with more complex logic. Offering a newer more simple solution
> is what I'm asking for. Meanwhile I'm happy to use the more complex
> solution that you helped me with (below).
>
Would it make any sense to define a `glibc-utf8-locales` package that actually
does include all of the UTF-8 locales?
In hindsight, it seems like it might have been better to have a more gradual
transition from recommending `glibc-utf8-locales` in the docs to removing it,
if that required everyone to update their configurations. (I haven't had a
problem personally, though.)
-Philip
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-27 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 9:59 glibc-utf8-locales Simon Josefsson via
2022-03-08 10:28 ` glibc-utf8-locales Tobias Geerinckx-Rice
2022-03-08 15:02 ` glibc-utf8-locales Simon Josefsson via
2022-03-09 16:41 ` glibc-utf8-locales Philip McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).