from portage.output import ConsoleStyleFile, StyleWriter
from portage.util import cmp_sort_key, writemsg_level
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
util.initialize_logger()
# 14 is the length of DESCRIPTION=""
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
from portage.util import writemsg
from portage.data import secpass
import portage
except ImportError:
import pickle
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class BlockerCache(portage.cache.mappings.MutableMapping):
"""This caches blockers of installed packages so that dep_check does not
have to be done for every single installed package on every invocation of
from _emerge.getloadavg import getloadavg
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class JobStatusDisplay(object):
_bound_properties = ("curval", "failed", "running")
# $Id$
import re
+import sys
from itertools import chain
import portage
from portage.dep import paren_reduce, use_reduce, \
paren_normalize, paren_enclose
from _emerge.Task import Task
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class Package(Task):
__hash__ = Task.__hash__
from _emerge.SlotObject import SlotObject
from _emerge.SequentialTaskQueue import SequentialTaskQueue
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class Scheduler(PollScheduler):
_opts_ignore_blockers = \
from _emerge.UnmergeDepPriority import UnmergeDepPriority
from _emerge.visible import visible
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class _frozen_depgraph_config(object):
def __init__(self, settings, trees, myopts, spinner):
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
+
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
# formats a size given in bytes nicely
def format_size(mysize):
if isinstance(mysize, basestring):
sys.stderr.write(" "+str(e)+"\n\n")
raise
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
# Assume utf_8 fs encoding everywhere except in merge code, where the
# user's locale is respected.
_encodings = {
import errno
import re
+import sys
from portage import os
from portage import _encodings
from portage import _unicode_encode
from portage.cache.template import reconstruct_eclasses
from portage.cache.mappings import ProtectedDict
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
# this is the old cache format, flat_list. count maintained here.
magic_line_count = 22
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
from portage.cache import fs_template
from portage.cache import cache_errors
from portage import os
from pysqlite2 import dbapi2 as db_module
DBError = db_module.Error
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class database(fs_template.FsBased):
autocommits = False
import sys
import warnings
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class database(object):
# this is for metadata/cache transfer.
# basically flags the cache needs be updated when transfered cache to cache.
import errno
import re
import stat
+import sys
from itertools import chain
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class bindbapi(fakedbapi):
_known_keys = frozenset(list(fakedbapi._known_keys) + \
["CHOST", "repository", "USE"])
except ImportError:
import pickle
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class PreservedLibsRegistry(object):
""" This class handles the tracking of preserved library objects """
def __init__(self, root, filename, autocommit=True):
pkgcmp, pkgsplit, ververify, _version
import portage.cache.mappings
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
def cpvequal(cpv1, cpv2):
"""
from __future__ import print_function
+import sys
from portage.output import EOutput, colorize
from portage.const import EBUILD_PHASES
from portage.localization import _
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
_items = []
def process(mysettings, key, logentries, fulltext):
global _items
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
from portage.localization import _
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
class PortageException(Exception):
"""General superclass for portage exceptions"""
def __init__(self,value):
import errno
import stat
+import sys
import time
from portage import os
from portage.exception import DirectoryNotFound, FileNotFound, \
from portage.util import writemsg
from portage.localization import _
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
HARDLINK_FD = -2
# Used by emerge in order to disable the "waiting for lock" message
from portage.localization import _
import portage
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
def create_message(sender, recipient, subject, body, attachments=None):
if sys.hexversion < 0x3000000:
except ImportError:
max_fd_limit = 256
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
if os.path.isdir("/proc/%i/fd" % os.getpid()):
def get_open_fds():
return (int(fd) for fd in os.listdir("/proc/%i/fd" % os.getpid()) \
from portage.proxy.objectproxy import ObjectProxy
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
_module_proxies = {}
_module_proxies_lock = threading.RLock()
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
from portage import cpv_getkey, flatten
from portage.dep import Atom, isvalidatom, match_from_list, \
best_match_to_list, dep_getkey, use_reduce, paren_reduce
from portage.exception import InvalidAtom
+if sys.hexversion >= 0x3000000:
+ basestring = str
+
OPERATIONS = ["merge", "unmerge"]
class PackageSet(object):