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 290CA1384E1 for ; Wed, 16 Jan 2013 13:43:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E56BB21C001; Wed, 16 Jan 2013 13:43:09 +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 7777521C001 for ; Wed, 16 Jan 2013 13:43:09 +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 587A833D781 for ; Wed, 16 Jan 2013 13:43:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E5C42E4073 for ; Wed, 16 Jan 2013 13:43:06 +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: <1358343750.006dcae3e2abadc1773b2d762b0f661ad69da851.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: 006dcae3e2abadc1773b2d762b0f661ad69da851 X-VCS-Branch: master Date: Wed, 16 Jan 2013 13:43:06 +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: 336ba5a2-4d15-4bbe-b6b5-0d117fddf2f4 X-Archives-Hash: 4f1c605561708eddb43bc1387ef5b7a5 commit: 006dcae3e2abadc1773b2d762b0f661ad69da851 Author: Sven Eden gmx de> AuthorDate: Wed Jan 16 13:42:30 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Wed Jan 16 13:42:30 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=006dcae3 Portage.pm: get_eprefix() now filteres warnings from portageq and writes them seperately out to stderr. Therefore warnings, like invalid contents in FEATURES, no longer break determining EPREFIX. --- Portage.pm | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/Portage.pm b/Portage.pm index 5443cf4..4b34372 100644 --- a/Portage.pm +++ b/Portage.pm @@ -59,8 +59,19 @@ if($lastorder ne 'conf') { sub get_eprefix() { - $eprefix = `portageq envvar EPREFIX 2>&1`; + my $tmp = "/tmp/ufed_$$.tmp"; + $eprefix = qx{portageq envvar EPREFIX 2>$tmp}; die "Couldn't determine EPREFIX from Portage" if $? != 0; + + if ( -s $tmp ) { + my $fTmp = undef; + if (open ($fTmp, "<", $tmp)) { + print STDERR "$_" while (<$fTmp>); + close $fTmp; + } + } + -e $tmp and unlink $tmp; + chomp($eprefix); }