Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585388 - app-portage/repoman: spawn_nofetch triggers KeyError: 'DEFINED_PHASES'
Summary: app-portage/repoman: spawn_nofetch triggers KeyError: 'DEFINED_PHASES'
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PATCH
Depends on: 585120
Blocks:
  Show dependency tree
 
Reported: 2016-06-08 14:48 UTC by Zac Medico
Modified: 2021-12-22 09:10 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 Zac Medico gentoo-dev 2016-06-08 14:48:03 UTC
$ repoman commit -m "dev-qt: version bump 5.6.1"
FEATURES variable contains unknown value(s): qa-experimental

RepoMan scours the neighborhood...
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/assistant
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/designer
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/linguist
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/linguist-tools
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/pixeltool
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qdbus
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qdbusviewer
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qdoc
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qt3d
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtbluetooth
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtcharts
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtchooser
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtconcurrent
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtcore
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtdbus
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtdeclarative
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtdiag
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtgraphicaleffects
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtgui
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qthelp
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtimageformats
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtlocation
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtmultimedia
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtnetwork
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtopengl
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtpaths
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtplugininfo
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtpositioning
>>> Creating Manifest for /home/michael/dev/gentoo/qt/dev-qt/qtprintsupport
>>> Downloading 'http://mirror.internode.on.net/pub/gentoo/distfiles/qtquick1-opensource-src-5.6.1.tar.xz'
--2016-06-08 23:56:02--  http://mirror.internode.on.net/pub/gentoo/distfiles/qtquick1-opensource-src-5.6.1.tar.xz
Resolving mirror.internode.on.net... 150.101.135.3
Connecting to mirror.internode.on.net|150.101.135.3|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-06-08 23:56:02 ERROR 404: Not Found.

>>> Downloading 'http://distfiles.gentoo.org/distfiles/qtquick1-opensource-src-5.6.1.tar.xz'
--2016-06-08 23:56:02--  http://distfiles.gentoo.org/distfiles/qtquick1-opensource-src-5.6.1.tar.xz
Resolving distfiles.gentoo.org... 64.50.236.52, 64.50.233.100, 216.165.129.135, ...
Connecting to distfiles.gentoo.org|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-06-08 23:56:03 ERROR 404: Not Found.

>>> Downloading 'https://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/qtquick1-opensource-src-5.6.1.tar.xz'
--2016-06-08 23:56:03--  https://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/qtquick1-opensource-src-5.6.1.tar.xz
Resolving download.qt.io... 77.86.229.90
Connecting to download.qt.io|77.86.229.90|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-06-08 23:56:05 ERROR 404: Not Found.

!!! Couldn't download 'qtquick1-opensource-src-5.6.1.tar.xz'. Aborting.
================================================================================================
======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ========
  File "/usr/lib/python-exec/python3.4/repoman", line 44, in <module>
    repoman_main(sys.argv[1:])
  File "/usr/lib64/python3.4/site-packages/repoman/main.py", line 117, in repoman_main
    scanner.scan_pkgs(can_force)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 327, in scan_pkgs
    _continue = func(**self.set_func_kwargs(mod[0], dynamic_data))
  File "/usr/lib64/python3.4/site-packages/repoman/modules/scan/manifest/manifests.py", line 57, in check
    mysettings=self.repoman_settings, myportdb=self.portdb)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/digestgen.py", line 148, in digestgen
    spawn_nofetch(myportdb, myebuild)
  File "/usr/lib64/python3.4/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/_spawn_nofetch.py", line 71, in spawn_nofetch
    defined_phases = settings['DEFINED_PHASES'].split()
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python3.4/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: 'DEFINED_PHASES'
Comment 1 Zac Medico gentoo-dev 2016-06-08 14:51:31 UTC
<zmedico> this one is a little puzzling at first, because in theory DEFINED_PHASES should have been set already :)
<zmedico> because setcpv should have been called
<kensington> interestingly, i wasn't able to immediately reproduce it
<kensington> subsequent repoman pass failed normally for that ebuild, so i removed it and started again, then hit the traceback again on another different ebuild that had the same problem
Comment 2 Zac Medico gentoo-dev 2016-06-08 15:09:15 UTC
See this commit from bug 569942:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=87e32d4863f3f72ace3fc123b04a0e6f5ff96799

The conditional there needs to be identical to the conditional that triggers the digestgen call.
Comment 3 Zac Medico gentoo-dev 2016-06-08 15:17:47 UTC
The code for bug 585120 is intertwined with this, since that also involves interaction between the Scanner class and manifest generation.
Comment 4 Zac Medico gentoo-dev 2016-06-19 22:12:24 UTC
Basically, you need to cache DEFINED_PHASES and stuff if you intend to generate manifest, otherwise you can cache a smaller subset of metadata keys. However, you need to know *when* you intend to generate a manifest, and that overlaps with  bug 585120.
Comment 5 Zac Medico gentoo-dev 2016-06-20 10:32:15 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/commits/bug_585388

The changes are actually quite minimal. The changes inside repoman/pym/repoman/modules/commit/manifest.py are mostly just indentation changes, due to the conditional logic being moved to the Scanner class.