From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 254EF138247 for ; Mon, 6 Jan 2014 21:19:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59861E0C43; Mon, 6 Jan 2014 21:19:19 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9E04CE0ABA for ; Mon, 6 Jan 2014 21:19:18 +0000 (UTC) Received: from localhost.localdomain ([88.150.18.76]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MTjMy-1VraOj1JPE-00QU5d for ; Mon, 06 Jan 2014 22:19:17 +0100 From: SebastianLuther@gmx.de To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] ResolverPlayground: Write layout.conf if needed Date: Mon, 6 Jan 2014 22:18:58 +0100 Message-Id: <1389043138-25173-1-git-send-email-SebastianLuther@gmx.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389042257-18865-1-git-send-email-SebastianLuther@gmx.de> References: <1389042257-18865-1-git-send-email-SebastianLuther@gmx.de> X-Provags-ID: V03:K0:i+Gc+JMA+nF5NPVfDomYn+e5MhRRWq8ImFdN28uml9Ku/D5Raz8 g4Fwb5L7ri2fvq0dnkhXZmV3KiB85edt0fWDPFiqg2kIEIiFcR3Q4PldVBPiomS5kwqGjxh VzPjXuv5PCERzm7Z/R1szmSb5kBCpCXJpS61QnL+KrSKViGJfPPdv4DrEL7mXJjV6EaR9tm c9KmlRWwRapIOnyDfu8sA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 6d51b2f0-5c45-4e0f-8292-5911a5e46e25 X-Archives-Hash: 7a5e768812eac87684edb0d104305741 From: Sebastian Luther --- pym/portage/tests/resolver/ResolverPlayground.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index e09e265..d066428 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -302,6 +302,12 @@ class ResolverPlayground(object): #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): + 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") + if repo == "test_repo": #Create a minimal profile in /usr/portage sub_profile_dir = os.path.join(profile_dir, "default", "linux", "x86", "test_profile") -- 1.8.3.2