diff options
author | Sebastian Luther <SebastianLuther@gmx.de> | 2010-08-09 12:05:54 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-12 01:17:25 -0700 |
commit | 924b062b55373cd4f75bc605cd5b56459f3e7823 (patch) | |
tree | cae5f76378e2f12fc49469494b5f724d7bb558a3 | |
parent | 102097d262eaddd820b3ea7792cc9757e1698c0c (diff) | |
download | portage-924b062b55373cd4f75bc605cd5b56459f3e7823.tar.gz portage-924b062b55373cd4f75bc605cd5b56459f3e7823.tar.bz2 portage-924b062b55373cd4f75bc605cd5b56459f3e7823.zip |
Tests: resolver/ResolverPlayground: Create a proper profile
-rw-r--r-- | pym/portage/tests/resolver/ResolverPlayground.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index f77216b56..d1ec55b82 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -152,13 +152,36 @@ class ResolverPlayground(object): f.write(cat + "\n") f.close() - #Create $PORTDIR/eclass (we fail to digest the ebuilds if it's not there) + #Create $profile_dir/eclass (we fail to digest the ebuilds if it's not there) os.makedirs(os.path.join(self.portdir, "eclass")) + + sub_profile_dir = os.path.join(profile_dir, "default", "linux", "x86", "test_profile") + os.makedirs(sub_profile_dir) + + eapi_file = os.path.join(sub_profile_dir, "eapi") + f = open(eapi_file, "w") + f.write("0\n") + f.close() + + make_defaults_file = os.path.join(sub_profile_dir, "make.defaults") + f = open(make_defaults_file, "w") + f.write("ARCH=\"x86\"\n") + f.write("ACCEPT_KEYWORDS=\"x86\"\n") + f.close() + use_force_file = os.path.join(sub_profile_dir, "use.force") + f = open(use_force_file, "w") + f.write("x86\n") + f.close() + if profile: #This is meant to allow the consumer to set up his own profile, #with package.mask and what not. raise NotImplentedError() + + #Create profile symlink + os.makedirs(os.path.join(self.root, "etc")) + os.symlink(sub_profile_dir, os.path.join(self.root, "etc", "make.profile")) def _load_config(self): env = { |