diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-27 23:13:41 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-27 23:13:41 -0800 |
commit | e626628a338aa90f9cf321ec89789da72f67a9e0 (patch) | |
tree | ee2460cefcaf6930294b7adce30fbbfdfa1767e1 /pym/portage/tests | |
parent | 656562dd40ea1487dd93a565f8f2f87040555b42 (diff) | |
download | portage-e626628a338aa90f9cf321ec89789da72f67a9e0.tar.gz portage-e626628a338aa90f9cf321ec89789da72f67a9e0.tar.bz2 portage-e626628a338aa90f9cf321ec89789da72f67a9e0.zip |
RepoConfig.update(): copy more attributes
This fixes a regression since commit
10246cd535f909dda8bd05de617c32d2b8a56b4a which caused layout.conf
settings such as thin-manifests to be ignored for repositories that
had repos.conf settings that did not specify the repository location.
In order to trigger this case, ResolverPlayground has been modified to
omit the location of each repository in the repos.conf file that it
generates.
Diffstat (limited to 'pym/portage/tests')
-rw-r--r-- | pym/portage/tests/ebuild/test_config.py | 2 | ||||
-rw-r--r-- | pym/portage/tests/resolver/ResolverPlayground.py | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/pym/portage/tests/ebuild/test_config.py b/pym/portage/tests/ebuild/test_config.py index 570cb2bc9..35694ede7 100644 --- a/pym/portage/tests/ebuild/test_config.py +++ b/pym/portage/tests/ebuild/test_config.py @@ -243,6 +243,8 @@ class ConfigTestCase(TestCase): self.assertTrue(len(new_repo_config.masters) > 0, "new_repo has no default master") self.assertEqual(new_repo_config.masters[0].user_location, playground.portdir, "new_repo default master is not PORTDIR") + self.assertEqual(new_repo_config.thin_manifest, True, + "new_repo_config.thin_manifest != True") new_manifest_file = os.path.join(playground.repo_dirs["new_repo"], "dev-libs", "A", "Manifest") self.assertEqual(os.path.exists(new_manifest_file), False) diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index 201c5c4af..140b25d6e 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -376,17 +376,13 @@ class ResolverPlayground(object): with open(os.path.join(metadata_dir, "metadata.xml"), 'w') as f: f.write(herds_xml) + # Write empty entries for each repository, in order to exercise + # RepoConfigLoader's repos.conf processing. repos_conf_file = os.path.join(user_config_dir, "repos.conf") f = open(repos_conf_file, "w") - priority = 0 for repo in sorted(self.repo_dirs.keys()): f.write("[%s]\n" % repo) - f.write("LOCATION=%s\n" % self.repo_dirs[repo]) - if repo == "test_repo": - f.write("PRIORITY=%s\n" % -1000) - else: - f.write("PRIORITY=%s\n" % priority) - priority += 1 + f.write("\n") f.close() for config_file, lines in user_config.items(): |