-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
if repo._masters_orig is None and self.mainRepo() and \
repo.name != self.mainRepo().name and not portage._sync_disabled_warnings:
+ # TODO: Delete masters code in pym/portage/tests/resolver/ResolverPlayground.py when deleting this warning.
writemsg_level("!!! %s\n" % _("Repository '%s' is missing masters attribute in '%s'") %
(repo.name, os.path.join(repo.location, "metadata", "layout.conf")) +
"!!! %s\n" % _("Set 'masters = %s' in this file for future compatibility") %
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import portage
"profile-formats = pms",
"thin-manifests = true",
"manifest-hashes = SHA256 SHA512 WHIRLPOOL",
+ "# use implicit masters"
),
}
}
with open(file_name, "w") as f:
for line in lines:
f.write("%s\n" % line)
+ # Temporarily write empty value of masters until it becomes default.
+ # TODO: Delete all references to "# use implicit masters" when empty value becomes default.
+ if config_file == "layout.conf" and not any(line.startswith(("masters =", "# use implicit masters")) for line in lines):
+ f.write("masters =\n")
#Create $profile_dir/eclass (we fail to digest the ebuilds if it's not there)
os.makedirs(os.path.join(repo_dir, "eclass"))
- # Set masters key in layout.conf for all repos except 'main-repo'
- if repo != "test_repo" and (not repo_config or "layout.conf" not in repo_config):
+ # Temporarily write empty value of masters until it becomes default.
+ if not repo_config or "layout.conf" not in repo_config:
layout_conf_path = os.path.join(repo_dir, "metadata", "layout.conf")
with open(layout_conf_path, "w") as f:
- f.write("masters = test_repo\n")
+ f.write("masters =\n")
if repo == "test_repo":
#Create a minimal profile in /usr/portage