From: Fabian Groffen Date: Sun, 16 Oct 2011 13:59:20 +0000 (+0200) Subject: Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ebcf640da49dc319ec3b642a1363726336cc36b6;p=portage.git Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: bin/ebuild bin/fixpackages bin/repoman --- ebcf640da49dc319ec3b642a1363726336cc36b6 diff --cc bin/ebuild index c64e88582,771ccb51c..a27b049d3 --- a/bin/ebuild +++ b/bin/ebuild @@@ -56,15 -56,12 +56,14 @@@ parser.add_option("--skip-manifest", he opts, pargs = parser.parse_args(args=sys.argv[1:]) - os.environ["PORTAGE_CALLER"]="ebuild" -try: - import portage -except ImportError: - from os import path as osp - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - import portage +# 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")) ++ sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) +import portage portage.dep._internal_warnings = True from portage import os diff --cc bin/fixpackages index a60852a02,dc43ed2b3..57b6db3b2 --- a/bin/fixpackages +++ b/bin/fixpackages @@@ -1,11 -1,18 +1,20 @@@ -#!/usr/bin/python +#!@PREFIX_PORTAGE_PYTHON@ - # Copyright 1999-2006 Gentoo Foundation + # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function - import os,sys - os.environ["PORTAGE_CALLER"]="fixpackages" + import os + import sys + -try: - import portage -except ImportError: - from os import path as osp ++# 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 ++import portage from portage import os from portage.output import EOutput diff --cc bin/repoman index 6d1164ad8,b1a2ac3fa..1f4175bd8 --- a/bin/repoman +++ b/bin/repoman @@@ -77,10 -75,7 +77,8 @@@ from portage.output import bold, create from portage.output import ConsoleStyleFile, StyleWriter from portage.util import cmp_sort_key, writemsg_level, writemsg_stdout from portage.package.ebuild.digestgen import digestgen - from portage.eapi import eapi_has_slot_deps, \ - eapi_has_use_deps, eapi_has_strong_blocks, eapi_has_iuse_defaults, \ - eapi_has_required_use, eapi_has_use_dep_defaults + from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use +from portage.const import EPREFIX if sys.hexversion >= 0x3000000: basestring = str