diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch new file mode 100644 index 0000000000..aa3a9e2654 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 5a6f019ded549faaf42478f6f96428dc7c20606e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 3 Aug 2018 09:42:06 -0700 | ||
4 | Subject: [PATCH 29/30] localedef --add-to-archive uses a hard-coded locale | ||
5 | path | ||
6 | |||
7 | it doesn't exist in normal use, and there's no way to pass an | ||
8 | alternative filename. | ||
9 | |||
10 | Add a fallback of $LOCALEARCHIVE from the environment, and allow | ||
11 | creation of new locale archives that are not the system archive. | ||
12 | |||
13 | Upstream-Status: Inappropriate (OE-specific) | ||
14 | |||
15 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | locale/programs/locarchive.c | 13 ++++++++----- | ||
19 | 1 file changed, 8 insertions(+), 5 deletions(-) | ||
20 | |||
21 | diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c | ||
22 | index ca332a345f..6b7ba9b2e3 100644 | ||
23 | --- a/locale/programs/locarchive.c | ||
24 | +++ b/locale/programs/locarchive.c | ||
25 | @@ -569,10 +569,13 @@ open_archive (struct locarhandle *ah, bool readonly) | ||
26 | /* If ah has a non-NULL fname open that otherwise open the default. */ | ||
27 | if (archivefname == NULL) | ||
28 | { | ||
29 | - archivefname = default_fname; | ||
30 | - if (output_prefix) | ||
31 | - memcpy (default_fname, output_prefix, prefix_len); | ||
32 | - strcpy (default_fname + prefix_len, ARCHIVE_NAME); | ||
33 | + archivefname = getenv("LOCALEARCHIVE"); | ||
34 | + if (archivefname == NULL) { | ||
35 | + archivefname = default_fname; | ||
36 | + if (output_prefix) | ||
37 | + memcpy (default_fname, output_prefix, prefix_len); | ||
38 | + strcpy (default_fname + prefix_len, ARCHIVE_NAME); | ||
39 | + } | ||
40 | } | ||
41 | |||
42 | while (1) | ||
43 | @@ -585,7 +588,7 @@ open_archive (struct locarhandle *ah, bool readonly) | ||
44 | the default locale archive we ignore the failure and | ||
45 | list an empty archive, otherwise we print an error | ||
46 | and exit. */ | ||
47 | - if (errno == ENOENT && archivefname == default_fname) | ||
48 | + if (errno == ENOENT) | ||
49 | { | ||
50 | if (readonly) | ||
51 | { | ||
52 | -- | ||
53 | 2.18.0 | ||
54 | |||