Summary: | RFE: LINGUAS fallbacks | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | kavol |
Component: | PMS/EAPI | Assignee: | Package Manager Specification <pms> |
Status: | RESOLVED OBSOLETE | ||
Severity: | enhancement | CC: | jer, pacho |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
kavol
2013-07-16 09:40:15 UTC
"If the ebuild procides" => "If the ebuild includes" ... interesting typo :-) One fundamental problem is that there are too many different build systems. I happen to maintain various packages which require different solutions. Yet besides the source packages' build systems, there are several ways to implement LINGUAS support in ebuilds: 1) The dynamic approach is to use eutils.eclass' strip-linguas function (or some other function specific to the source package) to find supported locales during src_prepare(), so that you do not need to add a static list of supported locales to IUSE. This helps maintainers greatly because now they do not need to check every new source package for changed locale support (additions, removals, renamings), but one detrimental side effect is that this stops us from exposing the supported locales to the emerge user (LINGUAS=...). 2) The static approach means that the package maintainer checks what locales are supported and lists them in IUSE, which makes LINGUAS a static list that /can/ be exposed to the emerge user, so that the emerge user knows beforehand what locales he can expect the package to support and can make configuration changes before emerging it.[1] It isn't obvious which of these approaches to locale support in ebuilds is better, and obviously we cannot expect every upstream to deploy one generic approach to listing and storing locale files in their releases. So we can't do this at the ebuild level. Best-matching of preferred linguas should thus be executed by the package manager. The LINGUAS variable simply holds a bunch of USE flags, and adding wildcards to USE variables is likely going to be more trouble than it's worth, so now the package manager will need to do a LINGUAS calculation (LINGUAS becoming an extra special case of a USE_EXPAND variable). Package managers would end up needing to expand LINGUAS="de*" or indeed take LINGUAS="de" to actually mean "de_*". [1] In some packages I implement a function that die()s when the locales in the sources do not match the locales listed in LINGUAS. This approach has its own problems. [2] http://www.gentoo.org/proj/en/qa/pms.xml LINGUAS is just a normal variable nowadays and no longer USE-expanded. Closing. |