summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-08 13:31:50 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-08 13:31:50 -0700
commit08b350a53b52adb18947ce2f1ffc56a8d59b02ba (patch)
tree78717d7c8b9d85c81c7598c4f6b347d6a6979e22 /bin
parent85dc824f7b7c595482cadc084411a455c2f00d32 (diff)
downloadportage-08b350a53b52adb18947ce2f1ffc56a8d59b02ba.tar.gz
portage-08b350a53b52adb18947ce2f1ffc56a8d59b02ba.tar.bz2
portage-08b350a53b52adb18947ce2f1ffc56a8d59b02ba.zip
egencache: tweak metadata-transfer logicv2.2.0_alpha125
Now is won't force metadata-transfer unless it's absolutely necessary.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/egencache14
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/egencache b/bin/egencache
index 1b4fa0cb8..f7b447130 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -881,20 +881,14 @@ def egencache_main(args):
return 1
if options.update and 'metadata-transfer' not in settings.features:
- metadata_transfer = True
+ # Forcibly enable metadata-transfer if portdbapi has a pregenerated
+ # cache that does not support eclass validation.
repo_config = settings.repositories.get_repo_for_location(repo_path)
cache = repo_config.get_pregenerated_cache(
portage.dbapi.dbapi._known_keys, readonly=True)
- if cache is not None:
- if cache.complete_eclass_entries:
- # If the portdbapi's pregenerated cache supports eclass
- # validation, then there's no need to forcibly enable
- # metadata-transfer.
- metadata_transfer = False
- cache = None
-
- if metadata_transfer:
+ if cache is not None and not cache.complete_eclass_entries:
settings.features.add('metadata-transfer')
+ cache = None
settings.lock()