diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-06-05 17:11:00 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-06-05 17:11:00 -0700 |
commit | 9e11086e9ec14b138f291eb501a81965e87be781 (patch) | |
tree | 741ab2707c0278c941ddd56f48d9d1115a530863 | |
parent | 2c50bd9a82c3bb6dfbc63466ae8bfbd401fb3235 (diff) | |
download | portage-9e11086e9ec14b138f291eb501a81965e87be781.tar.gz portage-9e11086e9ec14b138f291eb501a81965e87be781.tar.bz2 portage-9e11086e9ec14b138f291eb501a81965e87be781.zip |
parse_layout_conf: fix cache-formats pms fallback
This fixes an issue where egencache would not generate metadata/cache
unless the directory already existed.
-rw-r--r-- | pym/portage/repository/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 20f191948..9b43f3872 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -712,10 +712,10 @@ def parse_layout_conf(repo_location, repo_name=None): # for compatibility w/ PMS, fallback to pms; but also check if the # cache exists or not. - cache_formats = layout_data.get('cache-formats', 'pms').lower().split() - if 'pms' in cache_formats and not os.path.isdir( + cache_formats = layout_data.get('cache-formats', '').lower().split() + if not cache_formats and os.path.isdir( os.path.join(repo_location, 'metadata', 'cache')): - cache_formats.remove('pms') + cache_formats = ['pms'] data['cache-formats'] = tuple(cache_formats) manifest_hashes = layout_data.get('manifest-hashes') |