Gentoo Archives: gentoo-portage-dev

From: SebastianLuther@×××.de
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 1/2] ResolverPlayground: Write layout.conf if needed
Date: Mon, 06 Jan 2014 21:04:35
Message-Id: 1389042257-18865-1-git-send-email-SebastianLuther@gmx.de
1 From: Sebastian Luther <SebastianLuther@×××.de>
2
3 ---
4 pym/portage/tests/resolver/ResolverPlayground.py | 7 +++++++
5 1 file changed, 7 insertions(+)
6
7 diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
8 index e09e265..8487b9c 100644
9 --- a/pym/portage/tests/resolver/ResolverPlayground.py
10 +++ b/pym/portage/tests/resolver/ResolverPlayground.py
11 @@ -302,6 +302,13 @@ class ResolverPlayground(object):
12 #Create $profile_dir/eclass (we fail to digest the ebuilds if it's not there)
13 os.makedirs(os.path.join(repo_dir, "eclass"))
14
15 + # Set masters key in layout.conf for all repos except 'main-repo'
16 + if repo != "test_repo" and (not repo_config or "layout.conf" not in repo_config):
17 + layout_conf_path = os.path.join(repo_dir, "metadata", "layout.conf")
18 + f = open(layout_conf_path, "w")
19 + f.write("masters = test_repo\n")
20 + f.close()
21 +
22 if repo == "test_repo":
23 #Create a minimal profile in /usr/portage
24 sub_profile_dir = os.path.join(profile_dir, "default", "linux", "x86", "test_profile")
25 --
26 1.8.3.2

Replies