Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671472 - sys-apps/portage-2.3.51:porttree.py:1173: TypeError: zip argument #2 must support iteration
Summary: sys-apps/portage-2.3.51:porttree.py:1173: TypeError: zip argument #2 must sup...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 666956
  Show dependency tree
 
Reported: 2018-11-18 20:39 UTC by Reinis Danne
Modified: 2018-11-21 05:06 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 Reinis Danne 2018-11-18 20:39:46 UTC
Trying to emerge local version of virtualgl live ebuild crashes emerge.

I have bumblebee overlay with a broken ebuild (with now unsupported EAPI=5). When emerging specifically the local ebuild with bumped EAPI, the broken ebuild is sourced and emerge crashes.

It looks like it tries to emerge the wrong ebuild even though it was asked to and it said that it would be emerging the fixed ebuild.

Reproducible: Always

Steps to Reproduce:
1. layman -a bumblebee
2. cp -r /var/lib/layman/bumblebee/x11-misc/virtualgl /usr/local/portage/x11-misc/
3. cd /usr/local/portage/x11-misc/virtaulgl
4. echo '=x11-misc/virtualgl-9999-r1::local **' >> /etc/portage/package.keywords
5. sed -e 's/EAPI=5/EAPI=6/' -i virtualgl-9999-r1.ebuild
6. ebuild virtualgl-999-r1.ebuild digest
7. emerge -1 --quiet-build n virtualgl::local
Actual Results:  
# emerge -1 --quiet-build n virtualgl::local
                                                                                       
These are the packages that would be merged, in order:
                                                                                          
Calculating dependencies... done!       
[ebuild     U *] x11-misc/virtualgl-9999-r1::local [2.5.2::gentoo] USE="ssl -libressl" ABI_X86="32 (64) (-x32)" 0 KiB
                                         
Total: 1 package (1 upgrade), Size of downloads: 0 KiB                                                 
                                      
Would you like to merge these packages? [Yes/No]                                          
 * ERROR: x11-misc/virtualgl-9999-r1::bumblebee failed (depend phase):
 *   EAPI=5 is not supported                                                               
 *
 * Call stack:
 *                  ebuild.sh, line 635:  Called source '/var/lib/layman/bumblebee/x11-misc/virtualgl/virtualgl-9999-r1.ebuild'
 *   virtualgl-9999-r1.ebuild, line   6:  Called inherit 'cmake-multilib' 'multilib' 'systemd' 'git-r3'
 *                  ebuild.sh, line 326:  Called __qa_source '/usr/portage/eclass/cmake-multilib.eclass'
 *                  ebuild.sh, line 111:  Called source '/usr/portage/eclass/cmake-multilib.eclass'
 *      cmake-multilib.eclass, line  24:  Called die
 * The specific snippet of code:
 *      *) die "EAPI=${EAPI} is not supported" ;;
 *
 * If you need support, post the output of `emerge --info '=x11-misc/virtualgl-9999-r1::bumblebee'`,
 * the complete build log and the output of `emerge -pqv '=x11-misc/virtualgl-9999-r1::bumblebee'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/x11-misc/virtualgl-9999-r1/work/virtualgl-9999'
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.6/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 3325, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 536, in action_build
    graph_config=mydepgraph.schedulerGraph())
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 250, in __init__
    self._init_graph(graph_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 355, in _init_graph
    self._set_graph_config(graph_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 470, in _set_graph_config
    pkg.root_config, before_install=True)
  File "/usr/lib64/python3.6/site-packages/_emerge/create_world_atom.py", line 43, in create_world_atom
    for cpv in portdb.match(Atom(cp)):
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1220, in match
    return self.xmatch("match-visible", mydep)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1088, in xmatch
    self.async_xmatch(level, origdep, loop=loop))
  File "/usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py", line 135, in _run_until_complete
    return self._loop.run_until_complete(future)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.6/site-packages/portage/util/futures/compat_coroutine.py", line 115, in _next
    future = next(self._generator)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1173, in async_xmatch
    aux_keys, myrepo=cpv.repo, loop=loop))))
TypeError: zip argument #2 must support iteration


Expected Results:  
Should build the ebuild in local overlay even though there is a broken version in another overlay.

Portage 2.3.51 (python 3.6.6-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-8.2.0, glibc-2.27-r6, 4.18.19-gentoo x86_64)
=================================================================
System uname: Linux-4.18.19-gentoo-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.6
KiB Mem:     8017820 total,    502856 free
KiB Swap:    2047996 total,   1757596 free
Timestamp of repository gentoo: Sun, 18 Nov 2018 09:15:01 +0000
Head commit of repository gentoo: 629735f6a155db2343b80fd98b6e74bea158ef8f
Head commit of repository mausys: 91b5de7e778f01b28a9305a5609682373f65b1b2

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p3) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r1::gentoo
sys-devel/gcc:            7.3.0-r6::gentoo, 8.2.0-r4::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

mausys
    location: /usr/local/mausys/portage
    sync-type: git
    sync-uri: https://github.com/mausys/portage.git
    masters: gentoo
    priority: 0

atom
    location: /var/lib/layman/atom
    sync-type: laymansync
    sync-uri: https://github.com/elprans/atom-overlay.git
    masters: gentoo
    priority: 50

bumblebee
    location: /var/lib/layman/bumblebee
    sync-type: laymansync
    sync-uri: git://github.com/Bumblebee-Project/bumblebee-gentoo
    masters: gentoo
    priority: 50

haskell
    location: /var/lib/layman/haskell
    sync-type: laymansync
    sync-uri: git://github.com/gentoo-haskell/gentoo-haskell.git
    masters: gentoo
    priority: 50

mva
    location: /var/lib/layman/mva
    sync-type: laymansync
    sync-uri: https://github.com/msva/mva-overlay
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

x11
    location: /var/lib/layman/x11
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/x11
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 100

Installed sets: @gnome-extras
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -mtune=native -O2 -pipe -ggdb"
FEATURES="assume-digests binpkg-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O2 -pipe -ggdb"
GENTOO_MIRRORS="http://ftp.df.lth.se/pub/gentoo/ http://mirror.mdfnet.se/gentoo"
LANG="lv_LV.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="lv en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 cairo cdda cdio cdr cjk cleartype cli colord crypt cups cxx dbus dirac djvu dri dts dvd dvdr eds egl emboss encode evdev evo exif fam ffmpeg fftw flac fontconfig fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gphoto2 gpm gsm gstreamer gtk gtk3 iconv icu idn introspection ipv6 jpeg kate lcms libcaca libnotify libsecret libtirpc live lzma mad matroska mmx mng mp3 mp4 mpeg mtp multilib musepack nautilus ncurses networkmanager nls nptl ogg openexr opengl openmp opus pam pango pcre pdf png policykit ppds pulseaudio qt5 raw readline schroedinger sdl seccomp smp speex spell sse sse2 sse41 sse4_1 ssl ssse3 startup-notification svg system-sqlite systemd tcpd theora tiff tracker truetype udev udisks unicode upower usb v4l v4l2 vaapi vim-syntax vorbis vpx vulkan wayland wmf wxwidgets x264 xattr xcb xml xmp xpm xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="lv en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev i965 intel nouveau nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.3.51::gentoo was built with the following:
USE="(ipc) native-extensions rsync-verify xattr -build -doc -epydoc -gentoo-dev (-selinux)" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_5 python3_6 -pypy -python3_4 -python3_7"


x11-misc/virtualgl-2.5.2::gentoo was built with the following:
USE="ssl -libressl" ABI_X86="32 (64) (-x32)"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed"

# eix virtualgl
[U] x11-misc/virtualgl
     Available versions:  2.5.2 **9999-r1[1] (**)9999-r1[2] {libressl ssl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  2.5.2(18:48:20 2017.04.10.)(ssl -libressl ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.virtualgl.org/
     Description:         Run OpenGL applications remotely with full 3D hardware acceleration

[1] "bumblebee" /var/lib/layman/bumblebee
[2] "local" /usr/local/portage
Comment 1 Zac Medico gentoo-dev 2018-11-18 23:25:39 UTC
First of all, I can't reproduce your issue. For me, line 1173 in async_xmatch raises KeyError as expected, so it never reaches the zip call. So this is how it behaves for me:

> These are the packages that would be merged, in order:
> 
>  * ERROR: x11-misc/virtualgl-9999-r1::local failed (depend phase):
>  *   EAPI=5 is not supported
>  * 
>  * Call stack:
>  *                  ebuild.sh, line 635:  Called source '/usr/local/portage/x11-misc/virtualgl/virtualgl-9999-r1.ebuild'
>  *   virtualgl-9999-r1.ebuild, line   6:  Called inherit 'cmake-multilib' 'multilib' 'systemd' 'git-r3'
>  *                  ebuild.sh, line 326:  Called __qa_source '/usr/portage/eclass/cmake-multilib.eclass'
>  *                  ebuild.sh, line 111:  Called source '/usr/portage/eclass/cmake-multilib.eclass'
>  *      cmake-multilib.eclass, line  24:  Called die
>  * The specific snippet of code:
>  *   	*) die "EAPI=${EAPI} is not supported" ;;
>  * 
>  * If you need support, post the output of `emerge --info '=x11-misc/virtualgl-9999-r1::bumblebee'`,
>  * the complete build log and the output of `emerge -pqv '=x11-misc/virtualgl-9999-r1::bumblebee'`.
>  * Working directory: '/usr/lib64/python3.6/site-packages'
>  * S: '/var/tmp/portage/x11-misc/virtualgl-9999-r1/work/virtualgl-9999'
> 
> !!! All ebuilds that could satisfy "=x11-misc/virtualgl-9999-r1" have been masked.
> !!! One of the following masked packages is required to complete your request:
> - x11-misc/virtualgl-9999-r1::bumblebee (masked by: corruption)
> 
> For more information, see the MASKED PACKAGES section in the emerge
> man page or refer to the Gentoo Handbook.

Some information that you've posted in comment #0 appears to be contradictory:

Your sed -e 's/EAPI=5/EAPI=6/' call should have changed it to EAPI=6, but the "EAPI=5 is not supported" error shows that the ebuild really does not set EAPI=6. 

Your dependency calculation appears to have used stale metadata, because metadata could not have been generated with the current version of cmake-multilib.eclass and EAPI=5. So, we need to look at your metadata cache in /usr/local/portage/metadata. I suspect that you have the legacy /usr/local/portage/metadata/cache directory which does not have eclass digests, which would explain why stale metadata was used in your dependency calculation. You should remove the /usr/local/portage/metadata/cache directory, and then portage will default to the md5-dict format. You can explicitly set cache-formats = md5-dict in metadata/layout.conf in order to ensure that portage uses the correct format.
Comment 2 Zac Medico gentoo-dev 2018-11-18 23:38:42 UTC
Also, let us know if you have anything in /etc/portage/modules, since that can be used to configure a customized metadata cache module which could cause problems.
Comment 3 Reinis Danne 2018-11-19 12:33:16 UTC
I did not have a metadata/cache directory, only metadata/md5-cache. After moving it away, setting explicit cache format and regenerating the cache it still fails.

Note that I specify to emerge virtualgl::local but it fails when sourcing virtualgl::bumblebee. Why does it even touch that ebuild after asking for confirmation about virtualgl::local (which I assume happens after dependency calculation)?

⮕ # egencache --update --repo local                                                                                                                   
✔ 2018-11-19 14:16:17 rd-oc virtualgl
⮕ # ls -lrth /usr/local/portage/metadata/                                                                                                            
total 8,0K                          
-rw-r--r--  1 root root   43 nov 19 14:13 layout.conf                                                                                                
drwxr-xr-x 27 root root 4,0K nov 19 14:16 md5-cache      
✔ 2018-11-19 14:16:22 rd-oc virtualgl                                                                                                                
⮕ # emerge -1 --quiet-build n x11-misc/virtualgl::local
                                                                                                                                                     
These are the packages that would be merged, in order:
                                                                                                                                                     
Calculating dependencies... done!       
[ebuild     U *] x11-misc/virtualgl-9999-r1::local [2.5.2::gentoo] USE="ssl -libressl" ABI_X86="32 (64) (-x32)" 0 KiB                                
                                         
Total: 1 package (1 upgrade), Size of downloads: 0 KiB                                                                                               
                                      
Would you like to merge these packages? [Yes/No]                                                                                                     
 * ERROR: x11-misc/virtualgl-9999-r1::bumblebee failed (depend phase):
 *   EAPI=5 is not supported                                                                                                                         
 *                                               
 * Call stack:                                                                                                                                       
 *                  ebuild.sh, line 635:  Called source '/var/lib/layman/bumblebee/x11-misc/virtualgl/virtualgl-9999-r1.ebuild'
 *   virtualgl-9999-r1.ebuild, line   6:  Called inherit 'cmake-multilib' 'multilib' 'systemd' 'git-r3'                                              
 *                  ebuild.sh, line 326:  Called __qa_source '/usr/portage/eclass/cmake-multilib.eclass'
 *                  ebuild.sh, line 111:  Called source '/usr/portage/eclass/cmake-multilib.eclass'                                                  
 *      cmake-multilib.eclass, line  24:  Called die
 * The specific snippet of code:                                                                                                                     
 *      *) die "EAPI=${EAPI} is not supported" ;;
 *
 * If you need support, post the output of `emerge --info '=x11-misc/virtualgl-9999-r1::bumblebee'`,
 * the complete build log and the output of `emerge -pqv '=x11-misc/virtualgl-9999-r1::bumblebee'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/x11-misc/virtualgl-9999-r1/work/virtualgl-9999'
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.6/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 3325, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.6/site-packages/_emerge/actions.py", line 536, in action_build
    graph_config=mydepgraph.schedulerGraph())
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 250, in __init__
    self._init_graph(graph_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 355, in _init_graph
    self._set_graph_config(graph_config)
  File "/usr/lib64/python3.6/site-packages/_emerge/Scheduler.py", line 470, in _set_graph_config
    pkg.root_config, before_install=True)
  File "/usr/lib64/python3.6/site-packages/_emerge/create_world_atom.py", line 43, in create_world_atom
    for cpv in portdb.match(Atom(cp)):
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1220, in match
    return self.xmatch("match-visible", mydep)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1088, in xmatch
    self.async_xmatch(level, origdep, loop=loop))
  File "/usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py", line 135, in _run_until_complete
    return self._loop.run_until_complete(future)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.6/site-packages/portage/util/futures/compat_coroutine.py", line 115, in _next
    future = next(self._generator)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1173, in async_xmatch
    aux_keys, myrepo=cpv.repo, loop=loop))))
TypeError: zip argument #2 must support iteration
✘ 2018-11-19 14:17:00 rd-oc virtualgl
⮕ # ls -lrth /etc/portage/modules
ls: cannot access '/etc/portage/modules': No such file or directory
✘ 2018-11-19 14:24:49 rd-oc virtualgl
⮕ # cat /usr/local/portage/metadata/layout.conf 
masters = gentoo
cache-formats = md5-dict

✔ 2018-11-19 14:25:23 rd-oc virtualgl
⮕ # head -5 virtualgl-9999-r1.ebuild 
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

✔ 2018-11-19 14:32:02 rd-oc virtualgl
Comment 4 Reinis Danne 2018-11-19 13:18:02 UTC
Updated portage still fails the same way:

[I] sys-apps/portage
     Available versions:  2.3.8 2.3.40-r1 2.3.49 2.3.51 (~)2.3.52 **9999 {build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr PYTHON_TARGETS="pypy python2_7 python3_4 python3_5 python3_6 python3_7"}
     Installed versions:  2.3.52(15:05:07 2018.11.19.)(ipc native-extensions rsync-verify xattr -build -doc -epydoc -gentoo-dev -selinux PYTHON_TARGETS="python2_7 python3_5 python3_6 -pypy -python3_4 -python3_7")
     Homepage:            https://wiki.gentoo.org/wiki/Project:Portage
     Description:         Portage is the package management and distribution system for Gentoo

I don't know if it is relevant, but I'm using eix-sync and at the moment it fails to regen some of the caches because of the bumblebee ovelay (it stops at the first failure).

⮕ # cat /etc/eix-sync.conf                         
-H                                                                                                                                                   
@/usr/bin/egencache --jobs=8 --repo=bumblebee --update
@/usr/bin/egencache --jobs=8 --repo=haskell   --update                                
@/usr/bin/egencache --jobs=8 --repo=local     --update
@/usr/bin/egencache --jobs=8 --repo=science   --update                                  
@/usr/bin/egencache --jobs=8 --repo=x11       --update   
✔ 2018-11-19 15:04:43 rd-oc virtualgl                                                                                                                
⮕ # eix-sync
...
 * Running @-hooks                                                                                                                                    
 * ERROR: x11-misc/virtualgl-9999-r1::bumblebee failed (depend phase):                                                                                
 *   EAPI=5 is not supported                                                                                    
 *                                                                                                                               
 * Call stack:                                                                                                                                   
 *                  ebuild.sh, line 635:  Called source '/var/lib/layman/bumblebee/x11-misc/virtualgl/virtualgl-9999-r1.ebuild'
 *   virtualgl-9999-r1.ebuild, line   6:  Called inherit 'cmake-multilib' 'multilib' 'systemd' 'git-r3'
 *                  ebuild.sh, line 326:  Called __qa_source '/usr/portage/eclass/cmake-multilib.eclass'
 *                  ebuild.sh, line 111:  Called source '/usr/portage/eclass/cmake-multilib.eclass'
 *      cmake-multilib.eclass, line  24:  Called die
 * The specific snippet of code:
 *      *) die "EAPI=${EAPI} is not supported" ;;
 *
 * If you need support, post the output of `emerge --info '=x11-misc/virtualgl-9999-r1::bumblebee'`,
 * the complete build log and the output of `emerge -pqv '=x11-misc/virtualgl-9999-r1::bumblebee'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/x11-misc/virtualgl-9999-r1/work/virtualgl-9999'
Error processing x11-misc/virtualgl-9999-r1, continuing...
 * Something went wrong with /usr/bin/egencache --jobs=8 --repo=bumblebee --update
 * Copying old database to /var/cache/eix/previous.eix
 * Running eix-update
Reading Portage settings...
Building database (/var/cache/eix/portage.eix)...
[0] "gentoo" /usr/portage/ (cache: metadata-md5-or-flat)
     Reading category 167|167 (100) Finished
[1] "mausys" /usr/local/mausys/portage (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[2] "atom" /var/lib/layman/atom (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[3] "bumblebee" /var/lib/layman/bumblebee (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[4] "haskell" /var/lib/layman/haskell (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[5] "mva" /var/lib/layman/mva (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[6] "science" /var/lib/layman/science (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[7] "steam-overlay" /var/lib/layman/steam-overlay (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[8] "x11" /var/lib/layman/x11 (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
[9] "local" /usr/local/portage (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 167|167 (100) Finished
Applying masks...
Calculating hash tables...
Writing database file /var/cache/eix/portage.eix...
Database contains 22185 packages in 167 categories
 * Calling eix-diff
...
 * Time statistics:
   845 seconds for syncing
     9 seconds for eix-update
     2 seconds for eix-diff
   863 seconds total
✔ 2018-11-19 15:01:46 rd-oc virtualgl
⮕ #
Comment 5 Larry the Git Cow gentoo-dev 2018-11-20 10:28:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=74d2509c99fbcb43e018ead4950b938e41e524e5

commit 74d2509c99fbcb43e018ead4950b938e41e524e5
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-11-20 10:06:57 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-11-20 10:24:12 +0000

    compat_corouting._GeneratorTask: save throw return (bug 671472)
    
    According to PEP 342, the generator.throw() method returns a value if
    the exception is caught. The return value must be sent to the generator
    in order fufill the generator protocol. This is relevant in the
    portdbapi.async_xmatch() method, since it catches an exception thrown
    with the generator.throw() method.
    
    Bug: https://bugs.gentoo.org/671472
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/util/futures/compat_coroutine.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Comment 6 Zac Medico gentoo-dev 2018-11-20 10:30:20 UTC
I was able to reproduce the problem, and https://gitweb.gentoo.org/proj/portage.git/commit/?id=74d2509c99fbcb43e018ead4950b938e41e524e5 fixed it.
Comment 7 Reinis Danne 2018-11-20 15:52:19 UTC
Thank you! With the patch applied it works as expected.
Comment 8 Zac Medico gentoo-dev 2018-11-20 21:29:56 UTC
We can consider this as a regression, triggered by the compat_coroutine usage introduced for bug 666940.
Comment 9 Larry the Git Cow gentoo-dev 2018-11-21 05:05:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec4b54c4b0406d7f259dae34876da0b77d19fe3a

commit ec4b54c4b0406d7f259dae34876da0b77d19fe3a
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-11-21 04:53:16 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-11-21 05:04:55 +0000

    sys-apps/portage: revbump to 2.3.52-r1 for bug 671472
    
    Add trivial fix for an annoying regression in handling of
    broken ebuilds.
    
    Reported-by: Reinis Danne <rei4dan@gmail.com>
    Closes: https://bugs.gentoo.org/671472
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 .../portage/{portage-2.3.52.ebuild => portage-2.3.52-r1.ebuild}    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef23d0461d59c5e9c5627bf1c1e10cf120ae411b

commit ef23d0461d59c5e9c5627bf1c1e10cf120ae411b
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-11-21 04:53:16 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-11-21 05:04:55 +0000

    sys-apps/portage: revbump to 2.3.51-r1 for bug 671472
    
    Add trivial fix for an annoying regression in handling of
    broken ebuilds.
    
    Reported-by: Reinis Danne <rei4dan@gmail.com>
    Closes: https://bugs.gentoo.org/671472
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest                                          | 1 +
 .../portage/{portage-2.3.51.ebuild => portage-2.3.51-r1.ebuild}    | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)