summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 06:53:38 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 06:53:38 +0000
commita9c6d044c3bf085b4261f76ec6f9ba84475369ce (patch)
tree76633c761ba58931180cf51a60fc6a6642295034 /bin
parentFix typo in comment. (trunk r13264) (diff)
downloadportage-multirepo-a9c6d044c3bf085b4261f76ec6f9ba84475369ce.tar.gz
portage-multirepo-a9c6d044c3bf085b4261f76ec6f9ba84475369ce.tar.bz2
portage-multirepo-a9c6d044c3bf085b4261f76ec6f9ba84475369ce.zip
Automatically enable FEATURES=metadata-transfer if it's not enabled,
instead of bailing out. (trunk r13265) svn path=/main/branches/2.1.6/; revision=13444
Diffstat (limited to 'bin')
-rwxr-xr-xbin/egencache12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/egencache b/bin/egencache
index 4d0f5c9a..3c489461 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -243,10 +243,14 @@ def egencache_main(args):
target_root='/', env=env)
if 'metadata-transfer' not in settings.features:
- writemsg_level("ecachegen: error: " + \
- "FEATURES=metadata-transfer is not enabled\n",
- level=logging.ERROR, noiselevel=-1)
- return 1
+ writemsg_level("ecachegen: warning: " + \
+ "automatically enabling FEATURES=metadata-transfer\n",
+ level=logging.WARNING, noiselevel=-1)
+ settings.features.add('metadata-transfer')
+ settings['FEATURES'] = ' '.join(sorted(settings.features))
+ settings.backup_changes('FEATURES')
+
+ settings.lock()
portdb = portage.portdbapi(settings["PORTDIR"], mysettings=settings)