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 AF32D138FE0 for ; Wed, 26 Feb 2014 10:26:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86AD6E0999; Wed, 26 Feb 2014 10:26:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1291CE09B8 for ; Wed, 26 Feb 2014 10:26:37 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C0C433FAFE for ; Wed, 26 Feb 2014 10:26:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id DBFF4188ED for ; Wed, 26 Feb 2014 10:26:35 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1393408128.e495cb7fd8980b2c3dcef28426187c51a1d9de9e.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: Portage.pm X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: e495cb7fd8980b2c3dcef28426187c51a1d9de9e X-VCS-Branch: master Date: Wed, 26 Feb 2014 10:26:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5c052d6a-2e4f-47b4-88a7-507c7044c663 X-Archives-Hash: 5a1a6e3cf5df41a34cd3093bff6c9cd1 commit: e495cb7fd8980b2c3dcef28426187c51a1d9de9e Author: Sven Eden gmx net> AuthorDate: Wed Feb 26 09:48:48 2014 +0000 Commit: Sven Eden gmx de> CommitDate: Wed Feb 26 09:48:48 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=e495cb7f Portage.pm: Determining the make.profile is now secure of make.profile being a file. --- Portage.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Portage.pm b/Portage.pm index 71cada0..229ebba 100644 --- a/Portage.pm +++ b/Portage.pm @@ -400,11 +400,16 @@ sub _determine_profiles my $mp = undef; (-l $mp_path and $mp = readlink $mp_path) - or (-d $mp_path and $mp = $mp_path); + or (-d $mp_path and $mp = $mp_path) + # Be sure it is not a file either: + or (-f $mp_path and die( + "\n$mp_path is a file.\n" + . " This is an odd setup.\n" + . " Please report this incident!\n")); # make.profile is mandatory and must be a link or directory defined($mp) - or die "$mp_path is neither symlink nor directory\n"; + or die("\n$mp_path is neither symlink nor directory\n"); # Start with the found path, it is the deepest profile child. @_profiles = -l $mp_path ? _norm_path('/etc', $mp) : $mp;