Bug 24006 - Cyclic dependencies via copy in locales
Summary: Cyclic dependencies via copy in locales
Status: UNCONFIRMED
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-19 09:53 UTC by Pander
Modified: 2019-02-11 11:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pander 2018-12-19 09:53:11 UTC
Via 'copy', a locale can reuse definitions from another locale. This is very practical as it reduces the file size of a locale and eases maintenance.

Some locales copy parts from each other in both directions, however, resulting in cyclic dependencies. This prevents only using a one of these locales in a minimized setup, as both locales are always required.

Additionally, a cyclic dependency also increases the complexity or maintaining copied parts.

For these reasons it is better to untangle cyclic dependencies by interchanging definitions and reuse so that one of these locales is no longer depending on the other locale.

In most of these cases, a new local reuses a lot from an existing locale, but also adds definitions which were not present in the existing locale. When some of these new definitions apply for both locales, the older locale (in which these definitions were originally missing) starts using these via a copy. This can be very simple definitions such as paper size, but it creates a cyclic dependency, where it was better to move these definitions to the older locale and reuse them in the newer locale (which already does a lot of reuse of the older locale).

An overview of cyclic dependencies can be shown with the script https://github.com/PanderMusubi/locale-en-nl/blob/master/analysis/3-cyclic-dependencies.py

At the moment, the result is:
- Cyclic dependencies via copy found between locales en_US and en_GB
- Cyclic dependencies via copy found between locales om_ET and om_KE
- Cyclic dependencies via copy found between locales am_ET and ti_ET
- Cyclic dependencies via copy found between locales en_PH and tl_PH
- Cyclic dependencies via copy found between locales tl_PH and fil_PH
- Cyclic dependencies via copy found between locales ber_DZ and kab_DZ

I would like to propose that regarding only these cyclic dependencies (not other dependencies) are solved by eventually:
- en_GB depends on en_US
- om_ET depends on om_KE
- am_ET depends on ti_ET
- en_PH and tl_PH depend on fil_PH and en_US
- kab_DZ depends on ber_DZ

If desired by the maintainers of glibc, I can contribute patches for this, starting with the more simple cases, such as DZ and PH.