1 |
commit: 9e724f7824c11527316f822283242260be12c3d7 |
2 |
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net> |
3 |
AuthorDate: Tue Feb 25 18:15:22 2014 +0000 |
4 |
Commit: Sven Eden <sven.eden <AT> gmx <DOT> de> |
5 |
CommitDate: Tue Feb 25 18:15:22 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=9e724f78 |
7 |
|
8 |
Portage.pm: /etc/portage/make.profile does no longer need to be a symlink and can be a driectory as well now. |
9 |
|
10 |
--- |
11 |
Portage.pm | 26 ++++++++++++++++---------- |
12 |
1 file changed, 16 insertions(+), 10 deletions(-) |
13 |
|
14 |
diff --git a/Portage.pm b/Portage.pm |
15 |
index 5d42860..71cada0 100644 |
16 |
--- a/Portage.pm |
17 |
+++ b/Portage.pm |
18 |
@@ -386,22 +386,28 @@ sub _determine_make_conf |
19 |
} |
20 |
|
21 |
|
22 |
-# read /etc/make.profile and /etc/portage/make.profile and |
23 |
-# analyze the complete profile tree using the found parent |
24 |
-# files. Add all found paths to @profiles. |
25 |
+# read /etc/make.profile and /etc/portage/make.profile and analyze the complete |
26 |
+# profile tree using the found parent files. Add all found paths to @profiles. |
27 |
+ |
28 |
# No parameters accepted. |
29 |
sub _determine_profiles |
30 |
{ |
31 |
- my $mp = readlink "${_EPREFIX}/etc/portage/make.profile"; |
32 |
- defined($mp) |
33 |
- or $mp = readlink "${_EPREFIX}/etc/make.profile"; |
34 |
+ my $mp_path = "${_EPREFIX}/etc/portage/make.profile"; |
35 |
+ -e $mp_path or $mp_path = "${_EPREFIX}/etc/make.profile"; |
36 |
+ |
37 |
+ -e $mp_path |
38 |
+ or die("make.profile can not be found"); |
39 |
|
40 |
- # make.profile is mandatory and must be a link |
41 |
+ my $mp = undef; |
42 |
+ (-l $mp_path and $mp = readlink $mp_path) |
43 |
+ or (-d $mp_path and $mp = $mp_path); |
44 |
+ |
45 |
+ # make.profile is mandatory and must be a link or directory |
46 |
defined($mp) |
47 |
- or die "${_EPREFIX}/etc\{,/portage\}/make.profile is not a symlink\n"; |
48 |
+ or die "$mp_path is neither symlink nor directory\n"; |
49 |
|
50 |
- # Start with the linked path, it is the deepest profile child. |
51 |
- @_profiles = _norm_path('/etc', $mp); |
52 |
+ # Start with the found path, it is the deepest profile child. |
53 |
+ @_profiles = -l $mp_path ? _norm_path('/etc', $mp) : $mp; |
54 |
for (my $i = -1; $i >= -@_profiles; $i--) { |
55 |
for(_noncomments("${_profiles[$i]}/parent")) { |
56 |
splice(@_profiles, $i, 0, _norm_path(${_profiles[$i]}, $_)); |