Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494544 - sys-apps/portage-2.2.7 crash with expected str instance, bytes found in configparser 228
Summary: sys-apps/portage-2.2.7 crash with expected str instance, bytes found in confi...
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 16:12 UTC by kaszynek
Modified: 2014-12-04 05:49 UTC (History)
0 users

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 kaszynek 2013-12-17 16:12:32 UTC
Probably something went wrong with my last emerge. After that I'm getting error just after running 'emerge portage'

Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1016, in emerge_main
    action=myaction, args=myfiles, opts=myopts)
  File "/usr/lib64/portage/pym/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 3231, in load_emerge_config
    setconfig = load_default_config(settings, root_trees)
  File "/usr/lib64/portage/pym/portage/_sets/__init__.py", line 316, in load_default_config
    return SetConfig(_getfiles(), settings, trees)
  File "/usr/lib64/portage/pym/portage/_sets/__init__.py", line 76, in __init__
    read_file(f)
  File "/usr/lib64/python3.2/configparser.py", line 708, in read_file
    self._read(f, source)
  File "/usr/lib64/python3.2/configparser.py", line 1077, in _read
    fpname, lineno)
  File "/usr/lib64/python3.2/configparser.py", line 228, in __init__
    Error.__init__(self, "".join(msg))
TypeError: sequence item 1: expected str instance, bytes found


the value of msg in that line is
['While reading from ', b'/usr/share/portage/config/sets/portage.conf', ' [line 64]', ': option ', "'class'", ' in section ', "'module-rebuild'", ' already exists']


Reproducible: Always

Steps to Reproduce:
1. emerge portage



Expected Results:  



portage.conf (I didn't modified it) is:

# WARNING: default set configuration, DO NOT CHANGE.
# If you want to change anything redefine the relevant section in 
# /etc/portage/sets.conf. Any changes to this file will be lost on the next 
# portage update, and configuration errors here might upset portage in 
# unexpected ways.

# Not much that could be changed for world, so better leave it alone
[world]
class = portage.sets.base.DummyPackageSet
packages = @selected @system

# Not much that could be changed for world, so better leave it alone
[selected]
class = portage.sets.files.WorldSelectedSet

# Same as for world, though later portage versions might use a different class
[system]
class = portage.sets.profiles.PackagesSystemSet

# For security there are multiple classes available, but differences are 
# rather small (normally there should be no visible difference):
# - AffectedSet: include all GLSAs that cover a vulnerable package
# - NewAffectedSet: include all GLSAs that cover a vulnerable package and 
#   haven't been applied previously
# - NewGlsaSet: include all GLSAs that haven't been applied
# - SecuritySet: include all GLSAs
[security]
class = portage.sets.security.NewAffectedSet

# A superset of the classic <parameter>world</parameter> target, a set created
# by this class contains SLOT atoms to match all installed packages. Note that
# use of this set makes it impossible for emerge to solve blockers by automatic
# uninstallation of blocked packages.
[installed]
class = portage.sets.dbapi.EverythingSet

# The following treats all files in /etc/portage/sets as a package set called
# '$filename'.
[usersets]
class = portage.sets.files.StaticFileSet
multiset = true
directory =  %(PORTAGE_CONFIGROOT)setc/portage/sets
world-candidate = True

# Set to rebuild all packages that need a preserved lib that only remains due
# to FEATURES=preserve-libs
[preserved-rebuild]
class = portage.sets.libs.PreservedLibraryConsumerSet

# Installed ebuilds that inherit from known live eclasses.
[live-rebuild]
class = portage.sets.dbapi.VariableSet
variable = INHERITED
includes = bzr cvs darcs git git-2 mercurial subversion tla

# Installed packages that own files inside /lib/modules.
[module-rebuild]
class = portage.sets.dbapi.OwnerSet
files = /lib/modules

# Installed packages that own files inside /usr/lib/xorg/modules,
# excluding the package that owns /usr/bin/Xorg.
[x11-module-rebuild]
class = portage.sets.dbapi.OwnerSet
files = /usr/lib/xorg/modules
exclude-files = /usr/bin/Xorg

# Binary packages that have a different build time from a currently
# installed package of the exact same version.
[rebuilt-binaries]
class = portage.sets.dbapi.RebuiltBinaries

# Installed packages for which the highest visible ebuild
# version is lower than the currently installed version.
[downgrade]
class = portage.sets.dbapi.DowngradeSet

# Installed packages for which there are no visible ebuilds
# corresponding to the same $CATEGORY/$PN:$SLOT.
[unavailable]
class = portage.sets.dbapi.UnavailableSet

# Installed packages for which corresponding binary packages
# are not available.
[unavailable-binaries]
class = portage.sets.dbapi.UnavailableBinaries
Comment 1 Arfrever Frehtes Taifersar Arahesis 2013-12-17 22:04:01 UTC
(TypeError instead of another exception is http://bugs.python.org/issue18260)

Maybe you have shown wrong file?
Line 64 is in x11-module-rebuild section, not module-rebuild section.
Comment 2 kaszynek 2013-12-17 22:11:39 UTC
In fact that should be my question cause this is correct file and you are right line 64 is in x11-module-rebuild. I haven't modified it, emerge started to show this error suddenly after I tried to emerge bnfc package.
Comment 3 kaszynek 2013-12-17 22:36:04 UTC
It's working with python 2.7 and python 3.3 with python 3.2 

# python2.7 /usr/bin/emerge
emerge: the other white meat (command-line interface to the Portage system)

# python3.2 /usr/bin/emerge
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>

# python3.3 /usr/bin/emerge
emerge: the other white meat (command-line interface to the Portage system)
Comment 4 Arfrever Frehtes Taifersar Arahesis 2014-02-09 20:56:48 UTC
Please show: emerge --info
Does rebuilding of Python 3.2 help?
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2014-12-04 05:49:17 UTC
Closing as python-3.2 is no longer in the tree and no one else had duplicated the problem.