Replace relative imports with absolute imports for forward compatibility with python...
authorZac Medico <zmedico@gentoo.org>
Mon, 18 Sep 2006 03:54:07 +0000 (03:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 18 Sep 2006 03:54:07 +0000 (03:54 -0000)
svn path=/main/trunk/; revision=4470

pym/cache/anydbm.py
pym/cache/flat_hash.py
pym/cache/flat_list.py
pym/cache/fs_template.py
pym/cache/metadata.py
pym/cache/metadata_overlay.py
pym/cache/sql_template.py
pym/cache/sqlite.py
pym/cache/template.py
pym/cache/util.py

index e250980b98a840f6b77b0f3a6962eb2a1aea177b..87e448f301410626c5eeb18f671e6aa7cc24a304 100644 (file)
@@ -9,8 +9,8 @@ try:
 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):
index 59b00e8d4dd324420f261d82e321d74342ba818b..c46f00593c598fd5047fdb313700fea68ca5721b 100644 (file)
@@ -3,11 +3,11 @@
 # 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):
 
index 135b31e39947a07937154cfa23004c6aade54817..0cd3edb0eecf5fed914f73cdfef24f72c6e99992 100644 (file)
@@ -1,5 +1,5 @@
-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*.
index c63856da1695990f09ad40815059a148a10917b2..b76e98bd3b8791fe5b4195f30ca3b598d9dadc08 100644 (file)
@@ -4,7 +4,7 @@
 # $Id$
 
 import os
-import template, cache_errors
+from cache import template
 from portage_data import portage_gid
 
 class FsBased(template.database):
index 329af224c85e13693d5e7f04f8772afa0b40921d..0d5402342ac2361155d0ef0d3d8d65126828ee31 100644 (file)
@@ -4,11 +4,10 @@
 # $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
index 287e05521ca4734c53447bb18717aa436df9f596..673ba8dff8c86b20cf1a93c8c77b2be36241ecc0 100644 (file)
@@ -5,9 +5,9 @@
 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):
 
index 92e9e871309d49cb4e7efc918573efed07f471e3..5c8af08f8d82324543c79fe524f08bce3b7e6f45 100644 (file)
@@ -3,8 +3,8 @@
 # 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
index 4863b5997a74f296f82f95accfc8464fc50d328b..78d4cd6499274c217f95e2f315143a44151db0ec 100644 (file)
@@ -2,11 +2,11 @@
 # 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
index 7389a142e6a9621d270da8db98b3d4dd77b78f39..ff2bbeacf4e4c6db66c8a98035b25ac7717e1bd0 100644 (file)
@@ -3,8 +3,9 @@
 # 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.
index 0c8e585fd61682af6ae736ab16e97f956be5f57c..f2f62991c17b694523e67701ff6c279d2a71bf63 100644 (file)
@@ -3,7 +3,7 @@
 # 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):