From: Fabian Groffen Date: Mon, 24 Aug 2009 10:12:18 +0000 (-0000) Subject: fix portage meltdown due to wrong order of imports X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=53eda17bc73bfb22ee931c7a31fc06cf60c40231;p=portage.git fix portage meltdown due to wrong order of imports svn path=/main/branches/prefix/; revision=14150 --- diff --git a/bin/ebuild b/bin/ebuild index 7d536a6ab..4f8820471 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -27,14 +27,6 @@ signal.signal(signal.SIGUSR1, debug_signal) import optparse import os -# for an explanation on this logic, see pym/_emerge/__init__.py -from os import environ as ose -from os import path as osp -if ose.__contains__("PORTAGE_PYTHONPATH"): - sys.path.insert(0, ose["PORTAGE_PYTHONPATH"]) -else: - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp. realpath(__file__))), "pym")) - description = "See the ebuild(1) man page for more info" usage = "Usage: ebuild [command] ..." parser = optparse.OptionParser(description=description, usage=usage) @@ -63,6 +55,14 @@ if "merge" in pargs: os.environ["FEATURES"] = os.environ.get("FEATURES", "") + " -noauto" os.environ["PORTAGE_CALLER"]="ebuild" +# for an explanation on this logic, see pym/_emerge/__init__.py +from os import environ as ose +from os import path as osp +if ose.__contains__("PORTAGE_PYTHONPATH"): + sys.path.insert(0, ose["PORTAGE_PYTHONPATH"]) +else: + sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp. realpath(__file__))), "pym")) +import portage from portage import os