commit: bec96b544b88f7416c04ce4e9c3da1548e99cff2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Wed Feb 24 18:47:36 2021 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Wed Feb 24 18:48:04 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bec96b54
bin/shelve-utils: add sys.path insert Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> bin/shelve-utils | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/shelve-utils b/bin/shelve-utils index 5088ab5eb..83daeccbc 100755 --- a/bin/shelve-utils +++ b/bin/shelve-utils @@ -5,7 +5,11 @@ import argparse import sys +from os import path as osp +if osp.isfile(osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), ".portage_not_installed")): + sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "lib")) import portage +portage._internal_caller = True from portage.util.shelve import dump, restore