Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 640676

Summary: Traceback for invalid call to portage.package.ebuild.config.config.__getitem__
Product: Portage Development Reporter: Rafal Kupiec <belliash>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: critical    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Rafal Kupiec 2017-12-11 12:47:53 UTC
I tried to update system, so I've done emerge --sync:

Number of files: 169,038 (reg: 141,305, dir: 27,733)
Number of created files: 778 (reg: 735, dir: 43)
Number of deleted files: 930 (reg: 899, dir: 31)
Number of regular files transferred: 24,607
Total file size: 230.46M bytes
Total transferred file size: 67.49M bytes
Literal data: 67.49M bytes
Matched data: 0 bytes
File list size: 4.37M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 515.99K
Total bytes received: 72.77M

sent 515.99K bytes  received 72.77M bytes  4.44M bytes/sec
total size is 230.46M  speedup is 3.14
=== Sync completed for gentoo
q: Updating ebuild cache in /usr/repos/gentoo-portage ... 
q: Finished 38424 entries in 0.104490 seconds

Action: sync for repo: gentoo, returned code = 0

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

 * To update portage, run 'emerge --oneshot portage' now.


emerge --sync finished at 2017-12-11 13:40:31.

Afterwards I tried to emerge -avuDN @world, but it thrown a stacktrace.

Reproducible: Always

Steps to Reproduce:
1. emerge --sync
2. emerge -avuDN @world

Actual Results:  
└──> / # emerge -uDN @world

These are the packages that would be merged, in order:

Calculating dependencies                    r================================================================================================
======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ========
  File "/usr/lib/python-exec/python3.4/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 1250, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 3297, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 339, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9601, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9638, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 3813, in select_files
    return self._select_files(args)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 4156, in _select_files
    return self._resolve(myfavorites)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 4312, in _resolve
    self.altlist()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 7247, in altlist
    self._resolve_conflicts()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 7374, in _resolve_conflicts
    self._process_slot_conflicts()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1601, in _process_slot_conflicts
    self._process_slot_conflict(conflict)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1663, in _process_slot_conflict
    slot_nodes, conflict_atoms):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1742, in _slot_conflict_backtrack_abi
    self._slot_operator_update_probe_slot_conflict(dep)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1893, in _slot_operator_update_probe_slot_conflict
    slot_conflict=True, autounmask_level=autounmask_level)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1998, in _slot_operator_update_probe
    dep.parent.slot_atom, autounmask_level=autounmask_level):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 2422, in _iter_similar_available
    autounmask_level=autounmask_level):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 5875, in _pkg_visibility_check
    mreasons = _get_masking_status(pkg, pkgsettings, root_config, use=self._pkg_use_enabled(pkg))
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9884, in _get_masking_status
    portdb=root_config.trees["porttree"].dbapi, myrepo=myrepo)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/getmaskingstatus.py", line 100, in _getmaskingstatus
    myarch = settings["ARCH"]
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2610, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2663, in _getitem
    raise KeyError(mykey)
KeyError: 'ARCH'
================================================================================================
... done!
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 1250, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 3297, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 339, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9601, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9638, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 3813, in select_files
    return self._select_files(args)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 4156, in _select_files
    return self._resolve(myfavorites)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 4312, in _resolve
    self.altlist()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 7247, in altlist
    self._resolve_conflicts()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 7374, in _resolve_conflicts
    self._process_slot_conflicts()
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1601, in _process_slot_conflicts
    self._process_slot_conflict(conflict)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1663, in _process_slot_conflict
    slot_nodes, conflict_atoms):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1742, in _slot_conflict_backtrack_abi
    self._slot_operator_update_probe_slot_conflict(dep)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1893, in _slot_operator_update_probe_slot_conflict
    slot_conflict=True, autounmask_level=autounmask_level)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 1998, in _slot_operator_update_probe
    dep.parent.slot_atom, autounmask_level=autounmask_level):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 2422, in _iter_similar_available
    autounmask_level=autounmask_level):
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 5875, in _pkg_visibility_check
    mreasons = _get_masking_status(pkg, pkgsettings, root_config, use=self._pkg_use_enabled(pkg))
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9884, in _get_masking_status
    portdb=root_config.trees["porttree"].dbapi, myrepo=myrepo)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/getmaskingstatus.py", line 100, in _getmaskingstatus
    myarch = settings["ARCH"]
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2610, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2663, in _getitem
    raise KeyError(mykey)
KeyError: 'ARCH'


Expected Results:  
list of packages to be updated
Comment 1 Rafal Kupiec 2017-12-11 12:48:30 UTC
└──> / # equery l portage
 * Searching for portage ...
[IP-] [  ] sys-apps/portage-2.3.16:0
Comment 2 Rafal Kupiec 2017-12-11 12:49:30 UTC
This happens only when doing `emerge -uDN @world`

└──> / # emerge portage

These are the packages that would be merged, in order:

Calculating dependencies                              ... done!
[ebuild     U  ] sys-apps/portage-2.3.18::gentoo [2.3.16::gentoo] USE="(ipc) native-extensions xattr -build -doc -epydoc (-selinux)" LINGUAS="-ru" PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_5 -python3_6" 933 KiB

Total: 1 package (1 upgrade), Size of downloads: 933 KiB

Would you like to merge these packages? [Yes/No]
Comment 3 Zac Medico gentoo-dev 2017-12-11 17:38:37 UTC

*** This bug has been marked as a duplicate of bug 586214 ***