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 B92D1138247 for ; Tue, 5 Nov 2013 17:24:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB088E0AC0; Tue, 5 Nov 2013 17:24:53 +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 84C8FE0AC0 for ; Tue, 5 Nov 2013 17:24:53 +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 799A533EEB5 for ; Tue, 5 Nov 2013 17:24:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id F0342E545C for ; Tue, 5 Nov 2013 17:24:50 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1383672101.155295410d147b88886f7eb65f40dd9668747a92.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/euse X-VCS-Directories: bin/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 155295410d147b88886f7eb65f40dd9668747a92 X-VCS-Branch: gentoolkit Date: Tue, 5 Nov 2013 17:24:50 +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: 94c00da9-787d-462b-be36-acf515c7c12b X-Archives-Hash: f0a72ebc625f0ebf01f72429014a9bf7 commit: 155295410d147b88886f7eb65f40dd9668747a92 Author: Paul Varner gentoo org> AuthorDate: Tue Nov 5 17:21:41 2013 +0000 Commit: Paul Varner gentoo org> CommitDate: Tue Nov 5 17:21:41 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=15529541 euse: use portageq for get_portdir function unconditionally. Newer versions of portage don't define PORTDIR in make.conf or make.defaults. Additionally, if it is defined, it can still be overridden in repos.conf. Use portageq to ensure we have the correct value. --- bin/euse | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/bin/euse b/bin/euse index 96d1f9b..7d5c83a 100755 --- a/bin/euse +++ b/bin/euse @@ -714,26 +714,14 @@ get_flagstatus_pkg() { # Location of portage tree root # # OBSOLETE: newer versions of portage do not define PORTDIR -# in make.defaults or make.conf anymore. Add fallback to -#portageq to handle that situation. +# in make.defaults or make.conf anymore and can be overridden +# in repos.conf. Use portageq to determine the correct value. get_portdir() { # Use a subshell so we don't have to protect the variables in # the current scope ( - if [ -z "${PORTDIR:-}" ]; then - source "${MAKE_GLOBALS_PATH}" - for x in $(get_all_make_defaults); do - source "${x}" - done - for x in $(get_all_make_conf); do - source "${x}" - done - fi - - if [ -z "${PORTDIR:-}" ]; then eval $(portageq envvar -v PORTDIR) - fi - echo "${PORTDIR}" + echo "${PORTDIR}" ) } # }}} # This won't change while the script is running, so cache it