From eedc9cefc37526a6d1f224458fe3b1aef81e0de3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 16 Oct 2007 06:15:01 +0000 Subject: [PATCH] Move the emerge module to _emerge to make it private since it's mostly unsuitable for api consumers at this time. svn path=/main/trunk/; revision=8142 --- bin/emerge | 6 +++--- pym/{emerge => _emerge}/__init__.py | 6 +++--- pym/{emerge => _emerge}/help.py | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename pym/{emerge => _emerge}/__init__.py (99%) rename pym/{emerge => _emerge}/help.py (100%) diff --git a/bin/emerge b/bin/emerge index 0e12b173e..5901c2379 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4,18 +4,18 @@ # $Id$ try: - from emerge import * + import _emerge except ImportError: from os import path as osp import sys sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - from emerge import * + import _emerge if __name__ == "__main__": import sys from portage.exception import PermissionDenied try: - retval = emerge_main() + retval = _emerge.emerge_main() except PermissionDenied, e: sys.stderr.write("Permission denied: '%s'\n" % str(e)) sys.exit(e.errno) diff --git a/pym/emerge/__init__.py b/pym/_emerge/__init__.py similarity index 99% rename from pym/emerge/__init__.py rename to pym/_emerge/__init__.py index e1fa5e4b6..357b9aa06 100644 --- a/pym/emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -33,7 +33,7 @@ del os.environ["PORTAGE_LEGACY_GLOBALS"] from portage import digraph, portdbapi from portage.const import NEWS_LIB_PATH, CACHE_PATH, PRIVATE_PATH, USER_CONFIG_PATH, GLOBAL_CONFIG_PATH -import emerge.help +import _emerge.help import portage.xpak, commands, errno, re, socket, time, types from portage.output import blue, bold, colorize, darkblue, darkgreen, darkred, green, \ havecolor, nc_len, nocolor, red, teal, turquoise, white, xtermTitle, \ @@ -6700,7 +6700,7 @@ def emerge_main(): trees[settings["ROOT"]]["vartree"].dbapi) sys.exit(0) elif "--help" in myopts: - emerge.help.help(myaction, myopts, portage.output.havecolor) + _emerge.help.help(myaction, myopts, portage.output.havecolor) sys.exit(0) if "--debug" in myopts: @@ -6708,7 +6708,7 @@ def emerge_main(): print "myopts", myopts if not myaction and not myfiles and "--resume" not in myopts: - emerge.help.help(myaction, myopts, portage.output.havecolor) + _emerge.help.help(myaction, myopts, portage.output.havecolor) sys.exit(1) # check if root user is the current user for the actions where emerge needs this diff --git a/pym/emerge/help.py b/pym/_emerge/help.py similarity index 100% rename from pym/emerge/help.py rename to pym/_emerge/help.py -- 2.26.2