1 |
commit: e495cb7fd8980b2c3dcef28426187c51a1d9de9e |
2 |
Author: Sven Eden <yamakuzure <AT> gmx <DOT> net> |
3 |
AuthorDate: Wed Feb 26 09:48:48 2014 +0000 |
4 |
Commit: Sven Eden <sven.eden <AT> gmx <DOT> de> |
5 |
CommitDate: Wed Feb 26 09:48:48 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=e495cb7f |
7 |
|
8 |
Portage.pm: Determining the make.profile is now secure of make.profile being a file. |
9 |
|
10 |
--- |
11 |
Portage.pm | 9 +++++++-- |
12 |
1 file changed, 7 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/Portage.pm b/Portage.pm |
15 |
index 71cada0..229ebba 100644 |
16 |
--- a/Portage.pm |
17 |
+++ b/Portage.pm |
18 |
@@ -400,11 +400,16 @@ sub _determine_profiles |
19 |
|
20 |
my $mp = undef; |
21 |
(-l $mp_path and $mp = readlink $mp_path) |
22 |
- or (-d $mp_path and $mp = $mp_path); |
23 |
+ or (-d $mp_path and $mp = $mp_path) |
24 |
+ # Be sure it is not a file either: |
25 |
+ or (-f $mp_path and die( |
26 |
+ "\n$mp_path is a file.\n" |
27 |
+ . " This is an odd setup.\n" |
28 |
+ . " Please report this incident!\n")); |
29 |
|
30 |
# make.profile is mandatory and must be a link or directory |
31 |
defined($mp) |
32 |
- or die "$mp_path is neither symlink nor directory\n"; |
33 |
+ or die("\n$mp_path is neither symlink nor directory\n"); |
34 |
|
35 |
# Start with the found path, it is the deepest profile child. |
36 |
@_profiles = -l $mp_path ? _norm_path('/etc', $mp) : $mp; |