Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 381509 - sys-apps/portage: Add capability to merge with utf-8 encoding on POSIX locale (ascii)
Summary: sys-apps/portage: Add capability to merge with utf-8 encoding on POSIX locale...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 381649
  Show dependency tree
 
Reported: 2011-09-02 01:43 UTC by Paul Varner (RETIRED)
Modified: 2011-09-03 12:27 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 Paul Varner (RETIRED) gentoo-dev 2011-09-02 01:43:45 UTC
Some packages use utf-8 encoding in the filenames for some of the files.  On systems with a locale set to POSIX, this breaks the packages since the 'ascii' encoding is unable to process the utf-8 characters.  It would be nice if portage, just used utf-8 when merging the files.  See IRC conversation:

[20:15:46] <zmedico> fuzzyray: maybe it would be simpler for you if we just added a flag to make it merge the files regardless of encoding
[20:17:05] <zmedico> or utf8 anyway
[20:17:55] <zmedico> doing it for other encodings doesn't seem feasible
[20:18:23] <zmedico> but allowing utf8 would likely help you to avoid most or all breakage
[20:19:18] <zmedico> it wouldn't be much good for people with encodings that aren't a subset of utf8
[20:19:30] <zmedico> but for POSIX locale it would be fine
[20:20:08] <zmedico> I guess we could even make that the default behavior if you have a locale with ascii fs encoding
[20:25:06] <fuzzyray> Yeah, a flag to run portage with utf8 would work as well
[20:25:23] <zmedico> I think we can do that by default
[20:25:39] <zmedico> it beats breaking packages
[20:26:43] <zmedico> if sys.getfilesystemencoding() == 'ascii': _encodings['merge'] = 'utf_8'
[20:26:56] <zmedico> seems like a reasonable behavior
[20:27:46] <zmedico> that way almost anything should work by default, even with POSIX locale
[20:28:45] <zmedico> it's actually must simpler to do that a package.env thing
[20:28:58] <zmedico> and it would suck to have to configure package.env anyway
[20:29:04] <fuzzyray> Seems reasonable to me, just trying think if there would be any unintended consequences
[20:34:14] <fuzzyray> I think that would work, that's basically how I handle "unknown" encodings in gentoolkit and nobody has complained about it.

Reproducible: Always

Steps to Reproduce:
1. Set locale to a POSIX locale
2. emerge app-misc/ca-certificates
3. 
Actual Results:  
Note several certificates are not handled correctly due to the ascii filesystem encoding
Comment 2 Paul Varner (RETIRED) gentoo-dev 2011-09-02 04:32:23 UTC
Just tested the patch with Portage 2.1.10.11 and app-misc/ca-certificates and it worked perfectly.
Comment 3 Zac Medico gentoo-dev 2011-09-03 06:37:55 UTC
Thanks for testing. This is fixed in 2.1.10.12 and 2.2.0_alpha52.
Comment 4 Francesco Riosa 2011-09-03 12:27:52 UTC
*** Bug 381629 has been marked as a duplicate of this bug. ***