Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572494 - sys-apps/portage-2.2.27: KeyError: 'PORTAGE_SSH_OPTS'
Summary: sys-apps/portage-2.2.27: KeyError: 'PORTAGE_SSH_OPTS'
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 576848 (view as bug list)
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-01-21 09:16 UTC by Albert W. Hopkins
Modified: 2016-06-02 15:49 UTC (History)
1 user (show)

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 Albert W. Hopkins 2016-01-21 09:16:23 UTC
Ever since 2.2.27, I get this on my workstation when performing upgrades:

================================================================================================
======== 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/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 3236, in run_action
    emerge_config.args, spinner)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 505, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1032, in merge
    rval = self._merge()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1434, in _merge
    self._main_loop()
  File "/usr/lib64/python2.7/site-packages/_emerge/Scheduler.py", line 1405, in _main_loop
    self._event_loop.iteration()
  File "/usr/lib64/python2.7/site-packages/portage/util/_eventloop/EventLoop.py", line 270, in iteration
    if not x.callback(f, event, *x.args):
  File "/usr/lib64/python2.7/site-packages/_emerge/PipeReader.py", line 80, in _output_handler
    self.wait()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python2.7/site-packages/portage/util/_async/FileDigester.py", line 64, in _digest_pipe_reader_exit
    self.wait()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python2.7/site-packages/_emerge/BinpkgVerifier.py", line 79, in _digester_exit
    self.wait()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python2.7/site-packages/_emerge/BinpkgPrefetcher.py", line 42, in _verifier_exit
    self.wait()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 57, in wait
    self._wait_hook()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 175, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/python2.7/site-packages/_emerge/SequentialTaskQueue.py", line 57, in _task_exit
    self.schedule()
  File "/usr/lib64/python2.7/site-packages/_emerge/SequentialTaskQueue.py", line 45, in schedule
    task.start()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/python2.7/site-packages/_emerge/BinpkgPrefetcher.py", line 20, in _start
    self._start_task(fetcher, self._fetcher_exit)
  File "/usr/lib64/python2.7/site-packages/_emerge/CompositeTask.py", line 151, in _start_task
    task.start()
  File "/usr/lib64/python2.7/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/python2.7/site-packages/_emerge/BinpkgFetcher.py", line 88, in _start
    fcmd_vars[k] = settings[k]
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: 'PORTAGE_SSH_OPTS'
================================================================================================


The system is uses a PORTAGE_BINHOST but I don't get the error on the binhost.  I'm not using ssh for anything in portage however and I didn't see PORTAGE_SSH_OPTS anywere in my make.conf:

# emerge --info
Portage 2.2.27 (python 3.5.1-final-0, default/linux/amd64/13.0, gcc-5.3.0, glibc-2.22-r1, 4.4.0 x86_64)
=================================================================
System uname: Linux-4.4.0-x86_64-Intel-R-_Core-TM-_i7-5600U_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8064940 total,     92096 free
KiB Swap:    4194300 total,   3954304 free
Timestamp of repository gentoo: Thu, 21 Jan 2016 08:52:48 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.5.1-r2::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://blackwidow/portage
    priority: -1000
    sync-rsync-extra-opts: --exclude .rsync-filter

marduk
    location: /var/lib/layman/marduk
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA google-chrome google-talkplugin Google-TOS skype-4.0.0.7-copyright"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="     --autounmask=n      --binpkg-respect-use=y     --jobs      --keep-going      --misspell-suggestions=n     --oneshot     --quiet-build      --quiet-unmerge-warn      --usepkg   --getbinpkg --buildpkg --rebuilt-binaries=y --jobs=4 --with-bdeps=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks fixlafiles news noinfo nostrip notitles parallel-fetch parallel-install protect-owned sandbox sfperms skiprocheck strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/portage/packages"
PORTAGE_COMPRESS=""
PORTAGE_COMPRESS_FLAGS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude .rsync-filter"
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="acl aes amd64 avx avx2 cjk fma3 introspection ipv6 mmx mmxext nls opentype pam popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 systemd unicode utf8 xattr" ABI_X86="64" APACHE2_MODULES="authn_core authz_core authz_host authz_user unixd socache_shmcb auth_digest authn_file authz authz_groupfile dav dav_fs dir group_file mime" APACHE2_MPMS="prefork" CAMERAS="*" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" DRACUT_MODULES="lvm" ELIBC="glibc" FFTOOLS="*" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" NGINX_MODULES_HTTP="auth_basic gzip proxy rewrite uwsgi" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i915 i965"
USE_PYTHON="3.5 2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND
Comment 1 Rinaldus 2016-01-22 10:04:02 UTC
I confirm this bug.
Comment 3 Rinaldus 2016-01-23 10:42:56 UTC
(In reply to Zac Medico from comment #2)
> This is fixed in git:
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=1cf4d1e8381a44d9628feb7e3892b4ef70390ce8

Will you make new minor release to fix this bug or I have to switch to 9999 version of sys-apps/portage to fix it?
Comment 4 Zac Medico gentoo-dev 2016-01-23 15:15:56 UTC
(In reply to Rinaldus from comment #3)
> Will you make new minor release to fix this bug or I have to switch to 9999
> version of sys-apps/portage to fix it?

There will likely be a release soon, but you can easily apply the patch as follows:

mkdir -p /etc/portage/patches/sys-apps/portage-2.2.27
wget -O /etc/portage/patches/sys-apps/portage-2.2.27/portage_ssh_opts.patch "https://gitweb.gentoo.org/proj/portage.git/patch/?id=1cf4d1e8381a44d9628feb7e3892b4ef70390ce8"
emerge -1 =portage-2.2.27
Comment 5 Brian Dolbec gentoo-dev 2016-03-09 16:14:32 UTC
*** Bug 576848 has been marked as a duplicate of this bug. ***
Comment 6 Zac Medico gentoo-dev 2016-03-14 03:51:04 UTC
Fixed in 2.2.28.
Comment 7 Thomas Stein 2016-06-02 12:27:01 UTC
Hello Devs.

I get the very same error with portage-2.2.8 too.

/ # equery l portage
 * Searching for portage ...
[IP-] [  ] sys-apps/portage-2.2.28:0
/ # emerge -pvg perl-cleaner
================================================================================================
======== 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/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 2866, in run_action
    getbinpkgs="--getbinpkg" in emerge_config.opts)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 525, in populate
    self._populate(getbinpkgs)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 909, in _populate
    fcmd_vars[k] = self.settings[k]
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: u'PORTAGE_SSH_OPTS'
================================================================================================
--2016-06-02 14:24:51--  https://multibinhost01/Packages
Resolving multibinhost01
Connecting to multibinhost01|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 285286 (279K) [application/octet-stream]
Saving to: ‘/tmp/tmp_4A1rn’

/tmp/tmp_4A1rn                        100%[======================================================================>] 278.60K  --.-KB/s    in 0.004s  

2016-06-02 14:24:51 (68.0 MB/s) - ‘/tmp/tmp_4A1rn’ saved [285286/285286]


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

Calculating dependencies... done!
[binary   R    ] app-admin/perl-cleaner-2.20::gentoo  0 KiB

Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB
/ #
Comment 8 Zac Medico gentoo-dev 2016-06-02 15:49:13 UTC
(In reply to Thomas Stein from comment #7)
> Hello Devs.
> 
> I get the very same error with portage-2.2.8 too.

You can ignore that message. It's fixed in git now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=90e142b8fccba0507687b747478c5e060effcb00