First time around, get this error: [...] ../subst-install \ -o "dan" -g "dan" \ "."/make.conf "/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/usr/share/portage/config"/make.conf.example /home/dan/.gentoo/usr/bin/install -c -m 644 -o dan -g dan ./make.conf /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/usr/share/portage/config/make.conf.example /home/dan/.gentoo/usr/bin/install -c -d -m 755 -o "dan" -g "dan" /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/etc ../subst-install \ -o "dan" -g "dan" \ -t "/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/etc" \ "."/dispatch-conf.conf \ "."/etc-update.conf /home/dan/.gentoo/usr/bin/install -c -m 644 -o dan -g dan -t /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/etc ./dispatch-conf.conf ./etc-update.conf ( cd /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/etc && ln -s /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image//home/dan/.gentoo/usr/share/portage/config/make.globals ) make[1]: Leaving directory `/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/work/prefix-portage-2.2.01.16616/cnf' make[1]: Entering directory `/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/work/prefix-portage-2.2.01.16616' make[2]: Entering directory `/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/work/prefix-portage-2.2.01.16616' make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/work/prefix-portage-2.2.01.16616' make[1]: Leaving directory `/home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/work/prefix-portage-2.2.01.16616' >>> Completed installing portage-2.2.01.16616 into /home/dan/.gentoo/var/tmp/portage/sys-apps/portage-2.2.01.16616/image/home/dan/.gentoo/ strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment usr/lib/portage/bin/chpathtool ecompressdir: bzip2 -9 /home/dan/.gentoo/usr/share/man >>> Installing (1 of 2) sys-apps/portage-2.2.01.16616 Permission denied: 'makedirs('/var/lib/portage')' [back to prompt, return code not captured, sorry.] Then subsequent emerge attempts fails due to collision of: $EPREFIX/usr/share/doc/portage-2.2.01.16616/RELEASE-NOTES.bz2 $EPREFIX/usr/share/doc/portage-2.2.01.16616/NEWS.bz2 Happy to provide more details as requested, but won't be back at this machine until Monday (NZST).
what's your current portage version, 16610 by chance?
Created attachment 248495 [details, diff] hg changeset to fix mkdir /var/lib/portage bug if you are on 16610, then apply the attached patch to ${EPREFIX}/usr/lib/portage/pym/portage/dbapi/vartree.py
Yes, I was on sys-apps/portage-2.2.01.16610, and am now on sys-apps/portage-2.2.01.16616 following recommendations from #gentoo-prefix to just ignore and merge anyway. I removed the two conflicts, ran another emerge, and all is well. Marking this as closed, but feel free to reopen if necessary.