cache.ec = self.repositories.get_repo_for_location(tree).eclass_db
except AttributeError:
pass
+
+ if not cache.complete_eclass_entries:
+ warnings.warn(
+ ("Repository '%s' used deprecated 'pms' cache format. "
+ "Please migrate to 'md5-dict' format.") % (conf.name,),
+ DeprecationWarning)
+
return cache
def _init_cache_dirs(self):
if not force:
return
# The default egencache format was 'pms' prior to portage-2.1.11.32
- # (portage versions ersions prior to portage-2.1.11.14 will NOT
+ # (portage versions prior to portage-2.1.11.14 will NOT
# recognize md5-dict format unless it is explicitly listed in
# layout.conf).
formats = ('md5-dict',)
sys.exit(1)
"""),),
+ # Don't use python -Wd, since the pms format triggers deprecation warnings
+ # in portdbapi._create_pregen_cache().
(BASH_BINARY, "-c", "echo %s > %s" %
tuple(map(portage._shell_quote,
("cache-formats = pms md5-dict", layout_conf_path,)))),
- python_cmd + (textwrap.dedent("""
+ (portage_python, "-c") + (textwrap.dedent("""
import os, sys, portage
if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
sys.exit(1)
"""),),
- python_cmd + (textwrap.dedent("""
+ (portage_python, "-c") + (textwrap.dedent("""
import os, sys, portage
from portage.cache.metadata import database as pms_database
if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database):
sys.stderr.write(_unicode_decode(line))
self.assertEqual(os.EX_OK, proc.returncode,
- "command failed with args %s" % (args,))
+ "command %d failed with args %s" % (i, args,))
finally:
playground.cleanup()
portdir = settings["PORTDIR"]
var_cache_edb = os.path.join(eprefix, "var", "cache", "edb")
cachedir = os.path.join(var_cache_edb, "dep")
- cachedir_pregen = os.path.join(portdir, "metadata", "cache")
+ cachedir_pregen = os.path.join(portdir, "metadata", "md5-cache")
portage_python = portage._python_interpreter
ebuild_cmd = (portage_python, "-Wd",