# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import codecs
import stat
import textwrap
from _emerge.SpawnProcess import SpawnProcess
from portage import StringIO
from portage import _encodings
from portage import _unicode_decode
-from portage import _unicode_encode
from portage.util._pty import _create_pty_or_pipe
-from portage.util import apply_secpass_permissions, writemsg_stdout
+from portage.util import apply_secpass_permissions
class AbstractEbuildProcess(SpawnProcess):
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.DependencyArg import DependencyArg
-try:
- import portage
-except ImportError:
- from os import path as osp
- import sys
- sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
- import portage
+
class AtomArg(DependencyArg):
def __init__(self, atom=None, **kwargs):
DependencyArg.__init__(self, **kwargs)
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.AsynchronousTask import AsynchronousTask
from portage import os
from portage import _encodings
from portage import _unicode_decode
-from portage import _unicode_encode
-from portage import StringIO
from portage.package.ebuild.fetch import _checksum_failure_temp_file
-import codecs
class BinpkgVerifier(AsynchronousTask):
__slots__ = ("logfile", "pkg", "scheduler")
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.Task import Task
-try:
- import portage
-except ImportError:
- from os import path as osp
- import sys
- sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
- import portage
+
class Blocker(Task):
__hash__ = Task.__hash__
from portage.util import writemsg
import portage
from portage import os
-from portage import _encodings
-from portage import _unicode_encode
-import codecs
from portage.output import colorize
from portage.package.ebuild.digestcheck import digestcheck
from portage.package.ebuild.doebuild import _check_temp_dir
from portage import _unicode_decode
import codecs
from portage.elog.messages import eerror
-from portage.util import writemsg_stdout
from portage.util._pty import _create_pty_or_pipe
class EbuildFetcher(SpawnProcess):
# Distributed under the terms of the GNU General Public License v2
from _emerge.AbstractEbuildProcess import AbstractEbuildProcess
-import portage
-from portage import os
class EbuildSpawnProcess(AbstractEbuildProcess):
"""
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import codecs
import logging
import portage
from portage import os
-from portage import _encodings
-from portage import _unicode_encode
from _emerge.AsynchronousTask import AsynchronousTask
from _emerge.unmerge import unmerge
from _emerge.UninstallFailure import UninstallFailure
from portage import _encodings
from portage import _unicode_encode
-from portage import os
from portage.util import writemsg_level
from _emerge.SlotObject import SlotObject
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from _emerge.PackageVirtualDbapi import PackageVirtualDbapi
-
class RootConfig(object):
"""This is used internally by depgraph to track information about a
particular $ROOT."""
from __future__ import print_function
-import codecs
import gzip
import logging
import shutil
from portage import StringIO
from portage import os
from portage import _encodings
-from portage import _unicode_decode
from portage import _unicode_encode
from portage.cache.mappings import slot_dict_class
from portage.const import LIBC_PACKAGE_ATOM
import portage
from portage import os
from portage import digraph
-from portage import _unicode_decode, _unicode_encode
+from portage import _unicode_decode
from portage.cache.cache_errors import CacheError
from portage.const import GLOBAL_CONFIG_PATH, NEWS_LIB_PATH
from portage.dbapi.dep_expand import dep_expand
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import gc
-import portage
from portage.util.listdir import dircache
def clear_caches(trees):
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import portage
-
def create_world_atom(pkg, args_set, root_config):
"""Create a new atom for the world file if one does not exist. If the
argument atom is precise enough to identify a specific slot then a slot
from itertools import chain
-from portage.util import writemsg
from portage.dep import use_reduce, extract_affecting_use, check_required_use, get_required_use_flags
from portage.output import colorize
from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Don't use the unicode-wrapped os and shutil modules here since
from portage.localization import _
import selinux
-from selinux import is_selinux_enabled
def copyfile(src, dest):
src = _unicode_encode(src, encoding=_encodings['fs'], errors='strict')
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import time
from portage.cache import template
from portage.cache.cache_errors import CacheCorruption
from portage.cache.flat_hash import database as db_rw
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
from portage.cache import cache_errors
from portage import os
from portage import _unicode_decode
-from portage.cache.template import reconstruct_eclasses
from portage.util import writemsg
from portage.localization import _
try:
# checksum.py -- core Portage functionality
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import portage
-from portage.const import PRIVATE_PATH,PRELINK_BINARY,HASHING_BLOCKSIZE
+from portage.const import PRELINK_BINARY,HASHING_BLOCKSIZE
from portage.localization import _
from portage import os
from portage import _encodings
# data.py -- Calculated/Discovered Data Values
-# Copyright 1998-2009 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import os, sys, pwd, grp, platform
+import os, pwd, grp, platform
import portage
portage.proxy.lazyimport.lazyimport(globals(),
-# Copyright 1998-2009 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = [
_eapi_is_deprecated
from portage import os
from portage import _encodings
-from portage import _unicode_decode
from portage import _unicode_encode
from portage import OrderedDict
from _emerge.EbuildMetadataPhase import EbuildMetadataPhase
import codecs
import gc
-import re, shutil, stat, errno, copy, subprocess
+import re, shutil, stat, errno, subprocess
import logging
import os as _os
import stat
import portage
from portage.dep import Atom, match_from_list, use_reduce
-from portage.eapi import eapi_has_strong_blocks, eapi_has_use_deps, eapi_has_slot_deps, \
- eapi_has_use_dep_defaults
from portage.exception import InvalidDependString, ParseError
from portage.localization import _
from portage.util import writemsg, writemsg_level
# elog/messages.py - elog core functions
-# Copyright 2006-2007 Gentoo Foundation
+# Copyright 2006-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from portage.const import EBUILD_PHASES
-
def filter_loglevels(logentries, loglevels):
# remove unwanted entries from all logentries
rValue = {}
__all__ = ['doebuild', 'doebuild_environment', 'spawn', 'spawnebuild']
import codecs
-import errno
import gzip
from itertools import chain
import logging
from portage.elog import elog_process
from portage.elog.messages import eerror, eqawarn
from portage.exception import DigestException, FileNotFound, \
- IncorrectParameter, InvalidAtom, InvalidDependString, PermissionDenied, \
+ IncorrectParameter, InvalidDependString, PermissionDenied, \
UnsupportedAPIException
from portage.localization import _
from portage.manifest import Manifest
_shell_quote, _unicode_encode
from portage.checksum import perform_md5, verify_all
from portage.const import BASH_BINARY, CUSTOM_MIRRORS_FILE, \
- EBUILD_SH_BINARY, GLOBAL_CONFIG_PATH
+ GLOBAL_CONFIG_PATH
from portage.data import portage_gid, portage_uid, secpass, userpriv_groups
from portage.exception import FileNotFound, OperationNotPermitted, \
PermissionDenied, PortageException, TryAgain
# portage.py -- core Portage functionality
-# Copyright 1998-2009 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
from portage import _encodings
-from portage import _unicode_decode
from portage import _unicode_encode
import portage
portage.proxy.lazyimport.lazyimport(globals(),
-# Copyright 2007 Gentoo Foundation
+# Copyright 2007-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
from portage.dep import Atom, ExtendedAtomDict, best_match_to_list, match_from_list
from portage.exception import InvalidAtom
-from portage.versions import catsplit, cpv_getkey
+from portage.versions import cpv_getkey
if sys.hexversion >= 0x3000000:
basestring = str
# test_dep_getusedeps.py -- Portage Unit Testing Functionality
-# Copyright 2007 Gentoo Foundation
+# Copyright 2007-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
from portage.dep import dep_getusedeps
-import sys
from portage.tests import test_cps, test_slots, test_versions, test_usedeps
class DepGetUseDeps(TestCase):
-# Copyright 2009 Gentoo Foundation
+# Copyright 2009-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import portage
from portage.tests import TestCase
from portage.util._pty import _can_test_pty_eof, _test_pty_eof
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
-from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
+#from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
class RequiredUSETestCase(TestCase):
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
-from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
+#from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
class UseDepDefaultsTestCase(TestCase):
# test_grabDict.py -- Portage Unit Testing Functionality
-# Copyright 2006 Gentoo Foundation
+# Copyright 2006-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
-from portage.util import grabdict
+#from portage.util import grabdict
class GrabDictTestCase(TestCase):
# versions.py -- core Portage functionality
-# Copyright 1998-2006 Gentoo Foundation
+# Copyright 1998-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = [
import re
import warnings
+from portage.localization import _
# \w is [a-zA-Z0-9_]
suffix_value = {"pre": -2, "p": 0, "alpha": -4, "beta": -3, "rc": -1}
endversion_keys = ["pre", "p", "alpha", "beta", "rc"]
-from portage.exception import InvalidData
-from portage.localization import _
-
def ververify(myver, silent=1):
if ver_regexp.match(myver):
return 1
import codecs
import errno
import logging
-import re
import sys
from portage import os
from portage import subprocess_getstatusoutput