When running catalyst on a stage2 build, where the source stage1 has portage-2.2.27 in it, the following traceback occurs upon running 'emerge' inside the stage2 chroot: # time catalyst -v -f specs/o32/stage2-mips2-20160124.spec Catalyst, version 2.0.18 Copyright 2003-2008 Gentoo Foundation Copyright 2008-2012 various authors Distributed under the GNU General Public License version 2.1 Using default Catalyst configuration file, /etc/catalyst/catalyst.conf Setting sharedir to config file value "/usr/lib32/catalyst" Setting snapshot_cache to config file value "/usr/space/catalyst/snap_cache" Setting hash_function to config file value "crc32" Setting storedir to config file value "/usr/space/catalyst" Setting portdir to config file value "/usr/portage" Setting distdir to config file value "/usr/portage/distfiles" Setting options to config file value "autoresume bindist kerncache pkgcache seedcache snapcache" Autoresuming support enabled. Binary redistribution enabled Kernel cache support enabled. Package cache support enabled. Seed cache support enabled. Snapshot cache support enabled. Envscript support enabled. Using target: stage2 Building natively for mips Source path set to /usr/space/catalyst/tmp/o32/stage1-mips2-20160124/tmp/stage1root/ If this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf the source path will then be /usr/space/catalyst/builds/o32/stage1-mips2-20160124.tar.bz2 Caching snapshot to /usr/space/catalyst/snap_cache/20160124/ The autoresume path is /usr/space/catalyst/tmp/o32/.autoresume-stage2-mips2-20160124/ Location of the package cache is /usr/space/catalyst/packages/o32/mips2_o32-stage2-20160124 Location of the kerncache is /usr/space/catalyst/kerncache/o32/stage2-mips2-20160124/ Checking for processes running in chroot and killing them. --- Running action sequence: unpack Resume point detected, skipping unpack operation... --- Running action sequence: unpack_snapshot Valid snapshot cache, skipping unpack of portage tree... --- Running action sequence: setup_confdir Resume point detected, skipping setup_confdir operation... --- Running action sequence: portage_overlay --- Running action sequence: base_dirs --- Running action sequence: bind --- Running action sequence: chroot_setup Resume point detected, skipping chroot_setup operation... --- Running action sequence: setup_environment --- Running action sequence: run_local Copying stage2-chroot.sh to /tmp copying stage2-chroot.sh to /usr/space/catalyst/tmp/o32/stage2-mips2-20160124//tmp copying chroot-functions.sh to /usr/space/catalyst/tmp/o32/stage2-mips2-20160124//tmp Ensure the file has the executable bit set Running stage2-chroot.sh in chroot /usr/space/catalyst/tmp/o32/stage2-mips2-20160124/ ================================================================================================ ======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ======== File "/usr/lib/python-exec/python3.5/portageq", line 1451, in <module> sys.exit(main(sys.argv)) File "/usr/lib/python-exec/python3.5/portageq", line 1431, in main retval = function(args) File "/usr/lib/python-exec/python3.5/portageq", line 811, in envvar value = portage.settings.get(arg) File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 22, in __getattribute__ result = object.__getattribute__(self, '_get_target')() File "/usr/lib/python3.5/site-packages/portage/__init__.py", line 704, in _get_target return _get_legacy_global(name) File "/usr/lib/python3.5/site-packages/portage/_legacy_globals.py", line 59, in _get_legacy_global portage.groups = settings["ACCEPT_KEYWORDS"].split() File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__ return self._getitem(key) File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem raise KeyError(mykey) KeyError: 'ACCEPT_KEYWORDS' ================================================================================================ ================================================================================================ ======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ======== File "/usr/lib/python-exec/python3.5/portageq", line 1451, in <module> sys.exit(main(sys.argv)) File "/usr/lib/python-exec/python3.5/portageq", line 1430, in main args[0] = portage.settings['EROOT'] File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 44, in __getitem__ return object.__getattribute__(self, '_get_target')()[key] File "/usr/lib/python3.5/site-packages/portage/__init__.py", line 704, in _get_target return _get_legacy_global(name) File "/usr/lib/python3.5/site-packages/portage/_legacy_globals.py", line 59, in _get_legacy_global portage.groups = settings["ACCEPT_KEYWORDS"].split() File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__ return self._getitem(key) File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem raise KeyError(mykey) KeyError: 'ACCEPT_KEYWORDS' ================================================================================================ !!! Error: get_repo_path failed exiting ================================================================================================ ======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ======== File "/usr/lib/python-exec/python3.5/env-update", line 35, in <module> portage.env_update(makelinks) File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 31, in __call__ return result(*args, **kwargs) File "/usr/lib/python3.5/site-packages/portage/util/env_update.py", line 51, in env_update eprefix = portage.settings["EPREFIX"] File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 44, in __getitem__ return object.__getattribute__(self, '_get_target')()[key] File "/usr/lib/python3.5/site-packages/portage/__init__.py", line 704, in _get_target return _get_legacy_global(name) File "/usr/lib/python3.5/site-packages/portage/_legacy_globals.py", line 59, in _get_legacy_global portage.groups = settings["ACCEPT_KEYWORDS"].split() File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__ return self._getitem(key) File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem raise KeyError(mykey) KeyError: 'ACCEPT_KEYWORDS' ================================================================================================ Traceback (most recent call last): File "/usr/lib/python-exec/python3.5/env-update", line 35, in <module> portage.env_update(makelinks) File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 31, in __call__ return result(*args, **kwargs) File "/usr/lib/python3.5/site-packages/portage/util/env_update.py", line 51, in env_update eprefix = portage.settings["EPREFIX"] File "/usr/lib/python3.5/site-packages/portage/proxy/objectproxy.py", line 44, in __getitem__ return object.__getattribute__(self, '_get_target')()[key] File "/usr/lib/python3.5/site-packages/portage/__init__.py", line 704, in _get_target return _get_legacy_global(name) File "/usr/lib/python3.5/site-packages/portage/_legacy_globals.py", line 59, in _get_legacy_global portage.groups = settings["ACCEPT_KEYWORDS"].split() File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__ return self._getitem(key) File "/usr/lib/python3.5/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem raise KeyError(mykey) KeyError: 'ACCEPT_KEYWORDS' * Error: '' does not exist. Exiting. Press any key within 15 seconds to pause the build... SIGINT signal recieved killing ./tmp/stage2-chroot.sh with pid 31948 /usr/lib32/catalyst/targets/support/functions.sh: line 17: 31948 Killed ${clst_CHROOT} ${chroot_path} .${destdir}/${file_name} /proc is still mounted; performing auto-bind-umount... Auto-unbind successful... Traceback (most recent call last): File "/usr/lib32/catalyst/catalyst", line 218, in build_target mytarget.run() File "modules/generic_stage_target.py", line 1326, in run apply(getattr(self,x)) File "modules/generic_stage_target.py", line 1266, in run_local "run script failed.",env=self.env) File "/usr/lib32/catalyst/modules/catalyst_support.py", line 543, in cmd retval=spawn_bash(mycmd,env) File "/usr/lib32/catalyst/modules/catalyst_support.py", line 310, in spawn_bash return spawn(args,env=env,opt_name=opt_name,**keywords) File "/usr/lib32/catalyst/modules/catalyst_support.py", line 527, in spawn retval=os.waitpid(mypid[-1],0)[1] KeyboardInterrupt !!! catalyst: Error encountered during run of target stage2 Catalyst aborting.... real 0m36.736s user 0m3.020s sys 0m4.300s
The problem does not occur if the source stage1 is 2.2.26 and as part of the stage2, catalyst upgrades to 2.2.27. That will run fine (for some reason).
I seems that the profile is invalid for some reason, since otherwise you'd expect ACCEPT_KEYWORDS to be set. Anyway, it would be appropriate for the portage code which accesses ACCEPT_KEYWORDS to handle this case gracefully. We can have emerge show a warning message about the missing ACCEPT_KEYWORDS setting.
This is fixed in git: https://gitweb.gentoo.org/proj/portage.git/commit/?id=34f4f163eaadbccb0e37dbb780278bfacb8e8edb
Fixed in 2.2.28.