# portage.py -- core Portage functionality
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
#parse /etc/env.d and generate /etc/profile.env
def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
- env=None, writemsg_level=portage.util.writemsg_level):
+ env=None, writemsg_level=None):
+ if writemsg_level is None:
+ writemsg_level = portage.util.writemsg_level
if target_root is None:
global settings
target_root = settings["ROOT"]
# data.py -- Calculated/Discovered Data Values
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import os, sys, pwd, grp, platform
-from portage.util import writemsg
+
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:writemsg',
+)
+
from portage.output import colorize
from portage.output import create_color_func
bad = create_color_func("BAD")
-# Copyright 1998-2007 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import os
import re
+
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.locks:unlockfile',
+ 'portage.util:cmp_sort_key,writemsg',
+)
+
from portage.dep import match_from_list
-from portage.locks import unlockfile
from portage.output import colorize
-from portage.util import writemsg, cmp_sort_key
from portage import auxdbkeys, dep_expand
from portage.versions import catpkgsplit, pkgcmp
-# Copyright 1998-2007 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
__all__ = ["bindbapi", "binarytree"]
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:ensure_dirs,normalize_path,writemsg,writemsg_stdout',
+)
+
from portage.cache.mappings import slot_dict_class
from portage.dep import isvalidatom, isjustname, dep_getkey, match_from_list
from portage.dbapi.virtual import fakedbapi
from portage.exception import InvalidPackageName, \
PermissionDenied, PortageException
from portage.output import EOutput, colorize
-from portage.util import ensure_dirs, normalize_path, writemsg, writemsg_stdout
from portage.versions import best, catpkgsplit, catsplit
from portage.update import update_dbentries
from portage import dep_expand, listdir, _check_distfile, _movefile
-import portage
-
import os, errno, stat
import re
from itertools import chain, izip
-# Copyright 1998-2007 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
__all__ = ["portdbapi", "close_portdbapi_caches", "portagetree"]
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.checksum',
+ 'portage.util:ensure_dirs,writemsg',
+)
+
from portage.cache.cache_errors import CacheError
from portage.cache.mappings import slot_dict_class
from portage.const import REPO_NAME_LOC
from portage.exception import PortageException, \
FileNotFound, InvalidDependString, InvalidPackageName
from portage.manifest import Manifest
-from portage.util import ensure_dirs, writemsg
from portage.versions import pkgsplit, catpkgsplit, best, ver_regexp
-import portage.checksum
-
from portage import eclass_cache, auxdbkeys, doebuild, flatten, \
listdir, dep_expand, eapi_is_supported, key_expand, dep_check, \
_eapi_is_deprecated
-# Copyright 1998-2007 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
"vardbapi", "vartree", "dblink"] + \
["write_contents", "tar_contents"]
-from portage.checksum import perform_md5
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.checksum:perform_md5',
+ 'portage.locks:lockdir,unlockdir',
+ 'portage.util:apply_secpass_permissions,ConfigProtect,ensure_dirs,' + \
+ 'writemsg,writemsg_level,write_atomic,atomic_ofstream,writedict,' + \
+ 'grabfile,grabdict,normalize_path,new_protect_filename,getlibpaths'
+)
+
from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \
PORTAGE_PACKAGE_ATOM, PRIVATE_PATH, VDB_PATH
from portage.data import portage_gid, portage_uid, secpass
from portage.exception import CommandNotFound, \
InvalidData, InvalidPackageName, \
FileNotFound, PermissionDenied, UnsupportedAPIException
-from portage.locks import lockdir, unlockdir
from portage.output import bold, colorize
from portage.update import fixdbentries
-from portage.util import apply_secpass_permissions, ConfigProtect, ensure_dirs, \
- writemsg, writemsg_level, write_atomic, atomic_ofstream, writedict, \
- grabfile, grabdict, normalize_path, new_protect_filename, getlibpaths
from portage.versions import pkgsplit, catpkgsplit, catsplit, best, pkgcmp
from portage import listdir, dep_expand, digraph, flatten, key_expand, \
# elog/__init__.py - elog core functions
-# Copyright 2006-2007 Gentoo Foundation
+# Copyright 2006-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:writemsg',
+)
+
from portage.const import EBUILD_PHASES
from portage.exception import PortageException
from portage.process import atexit_register
-from portage.util import writemsg
-
from portage.elog.messages import collect_ebuild_messages, collect_messages
from portage.elog.filtering import filter_loglevels
# elog/messages.py - elog core functions
-# Copyright 2006-2007 Gentoo Foundation
+# Copyright 2006-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:writemsg',
+)
+
from portage.output import colorize
from portage.const import EBUILD_PHASES
-from portage.util import writemsg
import os
import sys
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
import errno, os
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.checksum:hashfunc_map,perform_multiple_checksums,verify_all',
+ 'portage.util:write_atomic',
+)
+
import portage.versions, portage.const
-from portage.checksum import *
from portage.exception import *
-from portage.util import write_atomic
class FileNotInManifestException(PortageException):
pass
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import re
import shlex
import sys
+
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:writemsg',
+)
+
from portage.const import COLOR_MAP_FILE
-from portage.util import writemsg
from portage.exception import CommandNotFound, FileNotFound, \
ParseError, PermissionDenied, PortageException
# portage.py -- core Portage functionality
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import signal
import sys
-from portage.util import dump_traceback
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:dump_traceback',
+)
+
from portage.const import BASH_BINARY, SANDBOX_BINARY, FAKEROOT_BINARY
from portage.exception import CommandNotFound
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
import errno, os, re, sys
-from portage.util import ConfigProtect, grabfile, new_protect_filename, \
- normalize_path, write_atomic, writemsg
+import portage
+portage.proxy.lazyimport.lazyimport(globals(),
+ 'portage.util:ConfigProtect,grabfile,new_protect_filename,' + \
+ 'normalize_path,write_atomic,writemsg',
+)
+
from portage.exception import DirectoryNotFound, PortageException
from portage.versions import ververify
from portage.dep import dep_getkey, get_operator, isvalidatom, isjustname, \