Trying to emerge a tbz2 file from a different prefix or a arm64 chroot emerge -avK htop for examples gives this result These are the packages that would be merged, in order: Calculating dependencies... done! [binary N ] sys-process/htop-2.2.0::gentoo USE="unicode -openvz -vserver" 0 KiB Total: 1 package (1 new, 1 binary), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] >>> Emerging binary (1 of 1) sys-process/htop-2.2.0::gentoo * htop-2.2.0.tbz2 MD5 SHA1 size ;-) ... [ ok ] >>> Extracting info * To use lsof features in htop(what processes are accessing * what files), you must have sys-process/lsof installed. * Checking for suitable kernel configuration options... [ ok ] >>> Extracting sys-process/htop-2.2.0 >>> Adjusting Prefix to /data/gentoo64 Exception in callback AsynchronousTask.wait() handle: <Handle AsynchronousTask.wait()> Traceback (most recent call last): File "/data/gentoo64/usr/lib64/python3.6/asyncio/events.py", line 145, in _run self._callback(*self._args) File "/data/gentoo64/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 84, in wait self._wait_hook() File "/data/gentoo64/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 195, in _wait_hook self._exit_listener_stack.pop()(self) File "/data/gentoo64/usr/lib64/python3.6/site-packages/_emerge/Binpkg.py", line 392, in _chpathtool_exit shutil.rmtree(self._image_dir) File "/data/gentoo64/usr/lib64/python3.6/site-packages/portage/__init__.py", line 246, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) File "/data/gentoo64/usr/lib64/python3.6/shutil.py", line 477, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/data/gentoo64/usr/lib64/python3.6/shutil.py", line 475, in rmtree orig_st = os.lstat(path) FileNotFoundError: [Errno 2] No such file or directory: '/data/gentoo64/var/tmp/portage/sys-process/htop-2.2.0/image' --Return-- > /data/gentoo64/usr/lib64/python3.6/site-packages/portage/util/_eventloop/asyncio_event_loop.py(81)_internal_caller_exception_handler()->None -> pdb.set_trace() (Pdb) There is no such file : /data/gentoo64/var/tmp/portage/sys-process/htop-2.2.0/image The directory is there while >>> Adjusting Prefix to /data/gentoo64 After that finishes it gets renamed to image_tmp And then the failure. I first had issues with gcc. Gcc is a larger package and i had time to look around the directory to see image directory being there while Adjusting Prefix to /data/gentoo64. Reproducible: Always
Prefix adjusting is brittle and surely mixing between prefix and non-prefix isn't going to work