Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547790 - l10n.eclass: Locale can end up being both disabled and enabled
Summary: l10n.eclass: Locale can end up being both disabled and enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 496508
  Show dependency tree
 
Reported: 2015-04-26 10:38 UTC by Markos Chandras (RETIRED)
Modified: 2018-01-19 09:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markos Chandras (RETIRED) gentoo-dev 2015-04-26 10:38:24 UTC
Comment taken straight from https://bugs.gentoo.org/show_bug.cgi?id=496508#c12

"Let's assume that PLOCALES="en it", PLOCALE_BACKUP="en", and no LINGUAS are enabled. The following happens:
    `l10n_get_locales` returns 'en'
    `l10n_get_locales disabled` returns 'en it'
i.e., the en locale is both enabled and disabled."
Comment 1 Ben de Groot (RETIRED) gentoo-dev 2015-04-26 23:26:53 UTC
The logic should be: there is a list of PLOCALES; if none of them are enabled, we enable the one in PLOCALE_BACKUP, because we must have at least one enabled locale.
Comment 2 Larry the Git Cow gentoo-dev 2018-01-19 09:15:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89b97dce78f2fb9a4ed646c7110f06f36cb0346a

commit 89b97dce78f2fb9a4ed646c7110f06f36cb0346a
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2018-01-12 21:31:04 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2018-01-19 09:15:30 +0000

    l10n.eclass: Disabled locales are the complement of enabled ones.
    
    Disabled locales returned by l10n_get_locales() should be the
    complement of enabled locales: disabled = PLOCALES \ enabled.
    
    So far, in the case of the enabled set falling back to PLOCALE_BACKUP,
    the backup locale would end up being both enabled and disabled.
    
    Closes: https://bugs.gentoo.org/547790

 eclass/l10n.eclass | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)