From 141408ea103bb3217a9204577a26d4c0724401ad Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 17 Mar 2012 14:56:37 -0700 Subject: [PATCH] Use eqawarn for install of non UTF-8 file names. This will fix bug #406749. --- pym/portage/dbapi/vartree.py | 3 ++- pym/portage/package/ebuild/doebuild.py | 18 +++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 6d354af20..f1e74aef9 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3581,7 +3581,8 @@ class dblink(object): break if unicode_errors: - eerror(_merge_unicode_error(unicode_errors)) + self._elog("eqawarn", "preinst", + _merge_unicode_error(unicode_errors)) if paths_with_newlines: msg = [] diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 4ff3eeaf7..5d2586b0b 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1805,7 +1805,7 @@ def _post_src_install_uid_fix(mysettings, out): if unicode_errors: for l in _merge_unicode_error(unicode_errors): - eerror(l, phase='install', key=mysettings.mycpv, out=out) + eqawarn(l, phase='install', key=mysettings.mycpv, out=out) build_info_dir = os.path.join(mysettings['PORTAGE_BUILDDIR'], 'build-info') @@ -2006,10 +2006,8 @@ def _post_src_install_soname_symlinks(mysettings, out): def _merge_unicode_error(errors): lines = [] - msg = _("This package installs one or more file names containing " - "characters that do not match your current locale " - "settings. The current setting for filesystem encoding is '%s'.") \ - % _encodings['merge'] + msg = _("QA Notice: This package installs one or more file names " + "containing characters that are not encoded with the UTF-8 encoding.") lines.extend(wrap(msg, 72)) lines.append("") @@ -2017,16 +2015,6 @@ def _merge_unicode_error(errors): lines.extend("\t" + x for x in errors) lines.append("") - if _encodings['merge'].lower().replace('_', '').replace('-', '') != 'utf8': - msg = _("For best results, UTF-8 encoding is recommended. See " - "the Gentoo Linux Localization Guide for instructions " - "about how to configure your locale for UTF-8 encoding:") - lines.extend(wrap(msg, 72)) - lines.append("") - lines.append("\t" + \ - "http://www.gentoo.org/doc/en/guide-localization.xml") - lines.append("") - return lines def _prepare_self_update(settings): -- 2.26.2