The getname/stat sanity check can fail with FEATURES=binpkg-multi-instance, and there's a simple fix: diff --git a/bin/quickpkg b/bin/quickpkg index faf1eddd4..7e9aa1373 100755 --- a/bin/quickpkg +++ b/bin/quickpkg @@ -177,8 +177,12 @@ def quickpkg_atom(options, infos, arg, eout): finally: if have_lock: dblnk.unlockdb() - bintree.inject(cpv, filename=binpkg_tmpfile) - binpkg_path = bintree.getname(cpv) + pkg_info = bintree.inject(cpv, filename=binpkg_tmpfile) + # The pkg_info value ensures that the following getname call + # returns the correct path when FEATURES=binpkg-multi-instance + # is enabled, but fallback to cpv in case the inject call + # returned None due to some kind of failure. + binpkg_path = bintree.getname(pkg_info or cpv) try: s = os.stat(binpkg_path) except OSError as e:
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=25ce021c8630fb75bab1bcce70f06fdafcd5c5a7 commit 25ce021c8630fb75bab1bcce70f06fdafcd5c5a7 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-11-16 23:13:26 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-11-16 23:15:12 +0000 quickpkg: fix stat sanity check for binpkg-multi-instance (bug 637902) Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7") Bug: https://bugs.gentoo.org/637902 bin/quickpkg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)}
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=682fc4b8ea1b2caeeef88596508026edea8e8ac5 commit 682fc4b8ea1b2caeeef88596508026edea8e8ac5 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2017-11-16 23:41:57 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2017-11-16 23:47:18 +0000 quickpkg: report all binarytree.inject failures (bug 637902) The binarytree.inject method should not return None unless something went wrong, therefore report failure whenever it returns None. Bug: https://bugs.gentoo.org/637902 bin/quickpkg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)}