1 |
commit: 19836e6de2a3723abe9b1f0440c7c08a28813f56 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 5 22:44:40 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 5 22:44:40 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=19836e6d |
7 |
|
8 |
ResolverPlayground: make.profile in /etc/portage |
9 |
|
10 |
--- |
11 |
pym/portage/tests/resolver/ResolverPlayground.py | 20 ++++++++++---------- |
12 |
1 files changed, 10 insertions(+), 10 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py |
15 |
index 67c4e5c..5d7c316 100644 |
16 |
--- a/pym/portage/tests/resolver/ResolverPlayground.py |
17 |
+++ b/pym/portage/tests/resolver/ResolverPlayground.py |
18 |
@@ -7,7 +7,8 @@ import sys |
19 |
import tempfile |
20 |
import portage |
21 |
from portage import os |
22 |
-from portage.const import GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH |
23 |
+from portage.const import (GLOBAL_CONFIG_PATH, PORTAGE_BASE_PATH, |
24 |
+ USER_CONFIG_PATH) |
25 |
from portage.dbapi.vartree import vartree |
26 |
from portage.dbapi.porttree import portagetree |
27 |
from portage.dbapi.bintree import binarytree |
28 |
@@ -245,6 +246,13 @@ class ResolverPlayground(object): |
29 |
|
30 |
def _create_profile(self, ebuilds, installed, profile, repo_configs, user_config, sets): |
31 |
|
32 |
+ user_config_dir = os.path.join(self.eroot, USER_CONFIG_PATH) |
33 |
+ |
34 |
+ try: |
35 |
+ os.makedirs(user_config_dir) |
36 |
+ except os.error: |
37 |
+ pass |
38 |
+ |
39 |
for repo in self.repo_dirs: |
40 |
repo_dir = self._get_repo_dir(repo) |
41 |
profile_dir = os.path.join(self._get_repo_dir(repo), "profiles") |
42 |
@@ -323,8 +331,7 @@ class ResolverPlayground(object): |
43 |
f.close() |
44 |
|
45 |
#Create profile symlink |
46 |
- os.makedirs(os.path.join(self.eroot, "etc")) |
47 |
- os.symlink(sub_profile_dir, os.path.join(self.eroot, "etc", "make.profile")) |
48 |
+ os.symlink(sub_profile_dir, os.path.join(user_config_dir, "make.profile")) |
49 |
|
50 |
#Create minimal herds.xml |
51 |
metadata_dir = os.path.join(repo_dir, "metadata") |
52 |
@@ -349,13 +356,6 @@ class ResolverPlayground(object): |
53 |
with open(os.path.join(metadata_dir, "metadata.xml"), 'w') as f: |
54 |
f.write(herds_xml) |
55 |
|
56 |
- user_config_dir = os.path.join(self.eroot, "etc", "portage") |
57 |
- |
58 |
- try: |
59 |
- os.makedirs(user_config_dir) |
60 |
- except os.error: |
61 |
- pass |
62 |
- |
63 |
repos_conf_file = os.path.join(user_config_dir, "repos.conf") |
64 |
f = open(repos_conf_file, "w") |
65 |
priority = 0 |