except ImportError:
import pickle
import os
-import fs_template
-import cache_errors
+from cache import fs_template
+from cache import cache_errors
class database(fs_template.FsBased):
# License: GPL2
# $Id$
-import fs_template
-import cache_errors
+from cache import fs_template
+from cache import cache_errors
import errno, os, stat
-from mappings import LazyLoad, ProtectedDict
-from template import reconstruct_eclasses
+from cache.mappings import LazyLoad, ProtectedDict
+from cache.template import reconstruct_eclasses
# store the current key order *here*.
class database(fs_template.FsBased):
-import fs_template
-import cache_errors
+from cache import fs_template
+from cache import cache_errors
import errno, os, stat
# store the current key order *here*.
# $Id$
import os
-import template, cache_errors
+from cache import template
from portage_data import portage_gid
class FsBased(template.database):
# $Id$
import os, stat, types
-import flat_hash
-import cache_errors
+from cache import flat_hash
import eclass_cache
-from template import reconstruct_eclasses, serialize_eclasses
-from mappings import ProtectedDict, LazyLoad
+from cache.template import reconstruct_eclasses
+from cache.mappings import ProtectedDict
# this is the old cache format, flat_list. count maintained here.
magic_line_count = 22
import time
if not hasattr(__builtins__, "set"):
from sets import Set as set
-import template
-from flat_hash import database as db_rw
-from metadata import database as db_ro
+from cache import template
+from cache.flat_hash import database as db_rw
+from cache.metadata import database as db_ro
class database(template.database):
# License: GPL2
# $Id$
-import template, cache_errors
-from template import reconstruct_eclasses
+from cache import template, cache_errors
+from cache.template import reconstruct_eclasses
class SQLDatabase(template.database):
"""template class for RDBM based caches
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-import fs_template
-import cache_errors
+from cache import fs_template
+from cache import cache_errors
import errno, os, stat
-from mappings import LazyLoad, ProtectedDict
-from template import reconstruct_eclasses
+from cache.mappings import LazyLoad, ProtectedDict
+from cache.template import reconstruct_eclasses
from portage_util import writemsg, apply_secpass_permissions
from portage_data import portage_gid
from pysqlite2 import dbapi2 as db_module
# License: GPL2
# $Id$
-import cache_errors
-from mappings import ProtectedDict
+from cache import cache_errors
+from cache.cache_errors import InvalidRestriction
+from cache.mappings import ProtectedDict
class database(object):
# this is for metadata/cache transfer.
# License: GPL2
# $Id$
-import cache_errors
+from cache import cache_errors
def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None, verbose_instance=None):