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 6CEC81381F3 for ; Wed, 11 Sep 2013 07:09:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75AB9E0BFB; Wed, 11 Sep 2013 07:09:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 09D14E0BFB for ; Wed, 11 Sep 2013 07:09:07 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C28CC33EB17 for ; Wed, 11 Sep 2013 07:09:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 71765E468F for ; Wed, 11 Sep 2013 07:09:05 +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: <1378883355.8912c242402f6a14ae31857bb4b75d950a371b06.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: 8912c242402f6a14ae31857bb4b75d950a371b06 X-VCS-Branch: master Date: Wed, 11 Sep 2013 07:09:05 +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: 6cde6c90-ca0a-4bdd-8c07-70e26acfdc15 X-Archives-Hash: 7a3c841cbfc5510225d2e4fe07a51536 commit: 8912c242402f6a14ae31857bb4b75d950a371b06 Author: Sven Eden gmx net> AuthorDate: Wed Sep 11 07:09:15 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Wed Sep 11 07:09:15 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=8912c242 Updated the fix for bug #478318 - It is more reliable now. --- Portage.pm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Portage.pm b/Portage.pm index a010186..dc7b964 100644 --- a/Portage.pm +++ b/Portage.pm @@ -264,24 +264,28 @@ sub _add_temp } -# Determine the value for EPREFIX and save it -# in $_EPREFIX. This is done using 'portageq'. +# Determine the values for EPREFIX, PORTDIR +# and PORTDIR_OVERLAY. These are saved in +# $_EPREFIX, $_PORTDIR and $_PORTDIR_OVERLAY. +# This is done using 'portageq'. # Other output from portageq is printed on # STDERR. # No parameters accepted. sub _determine_eprefix_portdir { my $tmp = "/tmp/ufed_$$.tmp"; my @res = map { - my $x=$_; + my $x = $_; chomp $x; - $x =~ s/^.*'([^']*)'.*$/$1/; + $x =~ s/'//g; $x } qx{portageq envvar -v EPREFIX PORTDIR PORTDIR_OVERLAY 2>$tmp}; - if (scalar @res) { - $_EPREFIX = $res[0]; - $_PORTDIR = $res[1]; - $_PORTDIR_OVERLAY = $res[2]; + while (my $res = shift @res) { + if ($res =~ /^(.*)=(.*)$/) { + "EPREFIX" eq $1 and $_EPREFIX = $2; + "PORTDIR" eq $1 and $_PORTDIR = $2; + "PORTDIR_OVERLAY" eq $1 and $_PORTDIR_OVERLAY = $2; + } debugMsg("EPREFIX='${_EPREFIX}'"); debugMsg("PORTDIR='${_PORTDIR}'"); debugMsg("PORTDIR_OVERLAY='${_PORTDIR_OVERLAY}'"); @@ -296,7 +300,6 @@ sub _determine_eprefix_portdir { } -e $tmp and unlink $tmp; - chomp($_EPREFIX); return; }