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 17940138FE2 for ; Wed, 26 Feb 2014 10:26:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 754B9E0AC7; Wed, 26 Feb 2014 10:26:39 +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 EFC1DE0A52 for ; Wed, 26 Feb 2014 10:26:38 +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 1289C33FB27 for ; Wed, 26 Feb 2014 10:26:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 88D11188EA 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: <1393352122.9e724f7824c11527316f822283242260be12c3d7.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: 9e724f7824c11527316f822283242260be12c3d7 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: fbd23f76-68e5-4756-b170-f03b7073b2d0 X-Archives-Hash: 292e82e99843b7237b735b80225ae05c commit: 9e724f7824c11527316f822283242260be12c3d7 Author: Sven Eden gmx net> AuthorDate: Tue Feb 25 18:15:22 2014 +0000 Commit: Sven Eden gmx de> CommitDate: Tue Feb 25 18:15:22 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=9e724f78 Portage.pm: /etc/portage/make.profile does no longer need to be a symlink and can be a driectory as well now. --- Portage.pm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Portage.pm b/Portage.pm index 5d42860..71cada0 100644 --- a/Portage.pm +++ b/Portage.pm @@ -386,22 +386,28 @@ sub _determine_make_conf } -# read /etc/make.profile and /etc/portage/make.profile and -# analyze the complete profile tree using the found parent -# files. Add all found paths to @profiles. +# read /etc/make.profile and /etc/portage/make.profile and analyze the complete +# profile tree using the found parent files. Add all found paths to @profiles. + # No parameters accepted. sub _determine_profiles { - my $mp = readlink "${_EPREFIX}/etc/portage/make.profile"; - defined($mp) - or $mp = readlink "${_EPREFIX}/etc/make.profile"; + my $mp_path = "${_EPREFIX}/etc/portage/make.profile"; + -e $mp_path or $mp_path = "${_EPREFIX}/etc/make.profile"; + + -e $mp_path + or die("make.profile can not be found"); - # make.profile is mandatory and must be a link + my $mp = undef; + (-l $mp_path and $mp = readlink $mp_path) + or (-d $mp_path and $mp = $mp_path); + + # make.profile is mandatory and must be a link or directory defined($mp) - or die "${_EPREFIX}/etc\{,/portage\}/make.profile is not a symlink\n"; + or die "$mp_path is neither symlink nor directory\n"; - # Start with the linked path, it is the deepest profile child. - @_profiles = _norm_path('/etc', $mp); + # Start with the found path, it is the deepest profile child. + @_profiles = -l $mp_path ? _norm_path('/etc', $mp) : $mp; for (my $i = -1; $i >= -@_profiles; $i--) { for(_noncomments("${_profiles[$i]}/parent")) { splice(@_profiles, $i, 0, _norm_path(${_profiles[$i]}, $_));