Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576788 - sys-apps/portage-2.2.26: dispatch-conf UnicodeDecodeError
Summary: sys-apps/portage-2.2.26: dispatch-conf UnicodeDecodeError
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 576790 (view as bug list)
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-03-08 15:47 UTC by lou
Modified: 2017-08-11 20:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix popen UnicodeDecode error (dispatch-conf-fix-popen-UnicodeDecode-error.patch,1.69 KB, patch)
2016-03-09 06:54 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lou 2016-03-08 15:47:13 UTC
dispatch-conf threw the following error this morning..

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.3/dispatch-conf", line 512, in <module>
    portage.settings.get('CONFIG_PROTECT', '')))
  File "/usr/lib/python-exec/python3.3/dispatch-conf", line 142, in grind
    confs += self.massage(proc.readlines())
  File "/usr/lib64/python3.3/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2548: ordinal not in range(128)

I see other older related bugs with UnicodeDecodeError and patches that were pushed up, so not sure if this bug is 100% related or is a new issue.

Related bugs:
https://bugs.gentoo.org/show_bug.cgi?id=545270
https://bugs.gentoo.org/show_bug.cgi?id=552176

My emerge --info:

Portage 2.2.26 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.7.3, glibc-2.21-r2, 3.6.11-gentoo-rscloud x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-rscloud-x86_64-AMD_Opteron-tm-_Processor_4332_HE-with-gentoo-2.2
KiB Mem:     2051884 total,     30948 free
KiB Swap:    4192960 total,   3948916 free
Timestamp of repository gentoo: Tue, 08 Mar 2016 10:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.2.5-r6::gentoo, 3.3.5-r2::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.3.6-r1::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.6.3::gentoo, 4.7.3-r1::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="amd64 apache2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv innodb maildir mmx mmxext modules multilib mysql ncurses nptl nptlonly openmp openssh pam pcre php pwdb readline sasl seccomp session snortsam sse sse2 ssl tcpd unicode vhosts xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi authn_core authz_core unixd socache_shmcb" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2016-03-08 15:55:47 UTC
*** Bug 576790 has been marked as a duplicate of this bug. ***
Comment 2 Zac Medico gentoo-dev 2016-03-08 17:59:16 UTC
It might help if you set a UTF-8 locale. Anyway, we should fix it to use subprocess.Popen, and decode the output with an explicit UTF-8 encoding. If decoding with UTF-8 also fails, we can display an error message and then prompt the user to press a key to continue.
Comment 3 Zac Medico gentoo-dev 2016-03-09 06:54:30 UTC
Created attachment 427788 [details, diff]
fix popen UnicodeDecode error

Save it as /etc/portage/patches/sys-apps/portage/bug_576788.patch, and then emerge portage. Please test.
Comment 4 Zac Medico gentoo-dev 2016-03-14 03:21:52 UTC
Patch posted for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/94d01378b176c482c06233c35de66c0d
Comment 6 Zac Medico gentoo-dev 2017-08-11 20:06:39 UTC
Fixed in 2.3.0.