From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 70581138334 for ; Fri, 4 Jan 2019 19:58:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7B65DE0922; Fri, 4 Jan 2019 19:58:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5901DE0922 for ; Fri, 4 Jan 2019 19:58:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A8A20335D1B for ; Fri, 4 Jan 2019 19:58:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32D51506 for ; Fri, 4 Jan 2019 19:58:22 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1546631879.16f334babfb02f67c9d529ce4758fafbe1290787.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 16f334babfb02f67c9d529ce4758fafbe1290787 X-VCS-Branch: master Date: Fri, 4 Jan 2019 19:58:22 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bbf3c6c3-acb8-4f8c-bf6a-47c038c07909 X-Archives-Hash: edc5b14999b0eb79a8866de6ed2c8256 commit: 16f334babfb02f67c9d529ce4758fafbe1290787 Author: Fabian Groffen gentoo org> AuthorDate: Fri Jan 4 19:55:22 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Jan 4 19:57:59 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=16f334ba scripts/bootstrap-prefix: ensure get_libdir doesn't return newlines When portageq fails, it returns a newline, which we don't want to have in our LDFLAGS (or anywhere else), so make sure we check if portageq returned something useful. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index ff5132ae7e..66edd753cf 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1668,7 +1668,11 @@ bootstrap_stage3() { fi fi - get_libdir() { portageq envvar LIBDIR_$(portageq envvar ABI) || echo lib; } + get_libdir() { + local l=$(portageq envvar LIBDIR_$(portageq envvar ABI) 2>/dev/null) + [[ -z ${l} ]] && l=lib + echo ${l} + } export CONFIG_SHELL="${ROOT}"/tmp/bin/bash export CPPFLAGS="-isystem ${ROOT}/usr/include"