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

Bug 575070

Summary: sys-apps/portage: KeyError: 'ARCH' when using binary packages
Product: Gentoo Linux Reporter: Jason A. Donenfeld <zx2c4>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Severity: normal Keywords: InVCS
Priority: Highest    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 573774    

Description Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2016-02-18 16:01:01 UTC
Portage 2.2.27, python 2.7.11

I use binary packages, and have done so successfully for the last 5 or so years.

With an update to portage, I now have this issue when running any emerge command:

krantz ~ # emerge -a nginx
Connected to
Fetching /Packages to /tmp/tmpfmqx8I
/Packages                                                                                                          100% 1165KB   1.1MB/s   1.1MB/s   00:00    
======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ========
  File "/usr/lib/python-exec/python2.7/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/", line 3219, in run_action
    emerge_config.opts) \
  File "/usr/lib64/python2.7/site-packages/portage/proxy/", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/_emerge/", line 43, in display_news_notification
    news_counts = count_unread_news(portdb, vardb)
  File "/usr/lib64/python2.7/site-packages/portage/", line 391, in count_unread_news
    count = manager.getUnreadItems(repo, update=True)
  File "/usr/lib64/python2.7/site-packages/portage/", line 177, in getUnreadItems
  File "/usr/lib64/python2.7/site-packages/portage/", line 147, in updateItems
    config=self.config, vardb=self.vdb):
  File "/usr/lib64/python2.7/site-packages/portage/", line 249, in isRelevant
  File "/usr/lib64/python2.7/site-packages/portage/", line 341, in checkRestriction
    if kwargs['config']['ARCH'] == self.keyword:
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: u'ARCH'
Comment 1 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2016-02-18 16:22:26 UTC
Ahh, just needed to add ARCH=amd64 to my /etc/portage/make.profile/make.defaults. Shouldn't this be transmitted by Packages though?
Comment 2 Zac Medico gentoo-dev 2016-02-18 16:25:46 UTC
This was fixed in the patch for bug 572826.
Comment 3 Zac Medico gentoo-dev 2016-03-14 03:39:55 UTC
Fixed in 2.2.28.