Hello. This is portage from master @ c65d9bc. With every emerge command I get this traceback: Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/emerge", line 44, in <module> from _emerge.main import emerge_main File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 23, in <module> from portage.sync import _SUBMODULE_PATH_MAP File "/usr/lib64/python3.4/site-packages/portage/sync/__init__.py", line 21, in <module> module_controller = Modules(path=path, namepath="portage.sync.modules") File "/usr/lib64/python3.4/site-packages/portage/module.py", line 85, in __init__ self._modules = self._get_all_modules() File "/usr/lib64/python3.4/site-packages/portage/module.py", line 110, in _get_all_modules new_module = Module(entry, self._namepath) File "/usr/lib64/python3.4/site-packages/portage/module.py", line 30, in __init__ self.initialized = self._initialize() File "/usr/lib64/python3.4/site-packages/portage/module.py", line 49, in _initialize kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) KeyError: 'sourcefile' Same with gentoolkit utilities like equery/eshowkw/epkginfo. Please fix. Reproducible: Always
I cannot get you `emerge --info` even.
The problem seems to be with laymansync module: $ python -m pdb /usr/bin/emerge > /usr/bin/emerge(11)<module>() -> from __future__ import with_statement (Pdb) continue Traceback (most recent call last): File "/usr/lib64/python3.4/pdb.py", line 1661, in main pdb._runscript(mainpyfile) File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript self.run(statement) File "/usr/lib64/python3.4/bdb.py", line 431, in run exec(cmd, globals, locals) File "<string>", line 1, in <module> File "/usr/bin/emerge", line 11, in <module> from __future__ import with_statement File "<string>", line 44, in <module> File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 23, in <module> from portage.sync import _SUBMODULE_PATH_MAP File "/usr/lib64/python3.4/site-packages/portage/sync/__init__.py", line 21, in <module> module_controller = Modules(path=path, namepath="portage.sync.modules") File "/usr/lib64/python3.4/site-packages/portage/module.py", line 85, in __init__ self._modules = self._get_all_modules() File "/usr/lib64/python3.4/site-packages/portage/module.py", line 110, in _get_all_modules new_module = Module(entry, self._namepath) File "/usr/lib64/python3.4/site-packages/portage/module.py", line 30, in __init__ self.initialized = self._initialize() File "/usr/lib64/python3.4/site-packages/portage/module.py", line 49, in _initialize kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) KeyError: 'sourcefile' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /usr/lib64/python3.4/site-packages/portage/module.py(49)_initialize() -> kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) (Pdb) p kid {'functions': ['sync', 'new', 'exists'], 'description': 'Layman plug-in module for portage.\nPerforms layman sync actions for layman overlays.\n', 'func_desc': {'exists': 'Returns a boolean of whether the specified dir exists and is a valid repository', 'new': 'Performs a layman add of the specified overlay', 'sync': 'Performs a layman sync of the specified overlay'}, 'validate_config': <class 'portage.sync.config_checks.CheckSyncConfig'>, 'class': 'PyLayman', 'name': 'laymansync'} I have app-portage/layman-2.3.0-r1 installed.
Manually adding 'sourcefile': 'laymansync', to module_spec variable in portage/sync/modules/laymansync/__init__.py solves the problem for me. Note that this change is not in layman master yet: https://gitweb.gentoo.org/proj/layman.git/tree/pm_plugins/portage/sync/modules/laymansync/__init__.py?id=b15d33d547a8fa99f6919036991e2a7e539fe04c
Please fix layman, or add a blocker for portage-9999, or at least add a warning.
We'll have to make it disable broken modules like this, with a warning message.
I'm adding backwards compatibility fallback with a warning the module_spec needs updating. I'll update layman's module_spec too. Likely revision bump it with the updated module_spec.
(In reply to Brian Dolbec from comment #6) > I'm adding backwards compatibility fallback with a warning the module_spec > needs updating. > > I'll update layman's module_spec too. Likely revision bump it with the > updated module_spec. Great! I am awaiting your changes to show up at https://github.com/gentoo/portage/commits/master so I can test them right away.
Fixed in git: https://gitweb.gentoo.org/proj/portage.git/commit/?id=75fbbcf58f244717712602a83765bcdc6f07ddcf Also layman's module_spec is updated in git: https://gitweb.gentoo.org/proj/layman.git/commit/?id=53b41cb4d01a7b6f31d09f7fdb0a0292b633b7e3 Sorry, my development checkouts lost laymansync capability, plus I hadn't done layman operations recently using the development code. Thank you for finding this quickly after I pushed the repoman stage2 re-write merge. Also, I noticed with layman's git HEAD code, layman-updater -R is not generating a proper repos.conf/layman.conf file. I'll get that fixed soon. But layman-2.3.0 will work properly with the new portage code. It'll just spit out a warning the module_spec is old and needs updating.
I can confirm that with portage-9999 from master @ 75fbbcf and layman-2.3.0-r1 this issue is no longer reproducible. Thank you very much.
Fixed in 2.3.0.