From: Fabian Groffen Date: Sat, 3 Dec 2011 16:47:25 +0000 (+0100) Subject: portageq: fix root/eroot handling for Prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=680c4144051d0b72a0066de5dbec2f20e8d0d71b;p=portage.git portageq: fix root/eroot handling for Prefix __PORTAGE_TEST_EPREFIX will almost always be empty, hence the code believes that no offset prefix is in use. In Prefix, this is always on the contrary, so when not set, use the hardwired EPREFIX from portage.const. This avoids double prefixes seen for the portageq functions, and hence funcs like has_version always return false. --- diff --git a/bin/portageq b/bin/portageq index fe980a20c..27a77a8d1 100755 --- a/bin/portageq +++ b/bin/portageq @@ -843,6 +843,10 @@ def main(): sys.stderr.flush() sys.exit(os.EX_USAGE) eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX") + # PREFIX LOCAL: make sure we fall back to our hardwired EPREFIX + if not eprefix: + eprefix = portage.const.EPREFIX + # END PREFIX LOCAL eroot = portage.util.normalize_path(sys.argv[2]) if eprefix: root = eroot[:1-len(eprefix)]