Move the emerge module to _emerge to make it private
authorZac Medico <zmedico@gentoo.org>
Tue, 16 Oct 2007 06:15:01 +0000 (06:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 16 Oct 2007 06:15:01 +0000 (06:15 -0000)
since it's mostly unsuitable for api consumers at
this time.

svn path=/main/trunk/; revision=8142

bin/emerge
pym/_emerge/__init__.py [moved from pym/emerge/__init__.py with 99% similarity]
pym/_emerge/help.py [moved from pym/emerge/help.py with 100% similarity]

index 0e12b173e59dc3b2b4f65b0e6eab32eb5a4c4405..5901c23790dcb360942f5d8b8f47bce47eb4db16 100755 (executable)
@@ -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)
similarity index 99%
rename from pym/emerge/__init__.py
rename to pym/_emerge/__init__.py
index e1fa5e4b67cc8b8d075df58358540bb591592865..357b9aa06ae4d42eb698259460bdbd9e7a876402 100644 (file)
@@ -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
similarity index 100%
rename from pym/emerge/help.py
rename to pym/_emerge/help.py