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 8934F1384B4 for ; Sun, 6 Dec 2015 17:20:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0442521C036; Sun, 6 Dec 2015 17:20:04 +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 1D32EE077C for ; Sun, 6 Dec 2015 17:20:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32A703407D0 for ; Sun, 6 Dec 2015 17:20:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 28E80CB2 for ; Sun, 6 Dec 2015 17:19:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1449422101.e98a0b87dbe1a99a1a7ac2410737ed0858129ffe.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:multilib-eapi6 commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/multilib-build.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: e98a0b87dbe1a99a1a7ac2410737ed0858129ffe X-VCS-Branch: multilib-eapi6 Date: Sun, 6 Dec 2015 17:19:58 +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: b25d7a2c-33d1-4ce2-ae9f-17b31f8f752d X-Archives-Hash: 60be6b3d337c3eb7bed8a9797a45641a commit: e98a0b87dbe1a99a1a7ac2410737ed0858129ffe Author: Michał Górny gentoo org> AuthorDate: Sun Dec 6 15:21:00 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Dec 6 17:15:01 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e98a0b87 multilib-build.eclass: Add missing error checks eclass/multilib-build.eclass | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index dd03553..09d4d72 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -262,19 +262,22 @@ multilib_for_best_abi() { # runs (if any). Dies if header files differ. multilib_check_headers() { _multilib_header_cksum() { + set -o pipefail + [[ -d ${ED}usr/include ]] && \ find "${ED}"usr/include -type f \ -exec cksum {} + | sort -k2 } - local cksum=$(_multilib_header_cksum) + local cksum cksum_prev local cksum_file=${T}/.multilib_header_cksum + cksum=$(_multilib_header_cksum) || die if [[ -f ${cksum_file} ]]; then - local cksum_prev=$(< "${cksum_file}") + cksum_prev=$(< "${cksum_file}") || die if [[ ${cksum} != ${cksum_prev} ]]; then - echo "${cksum}" > "${cksum_file}.new" + echo "${cksum}" > "${cksum_file}.new" || die eerror "Header files have changed between ABIs." @@ -288,7 +291,7 @@ multilib_check_headers() { die "Header checksum mismatch, aborting." fi else - echo "${cksum}" > "${cksum_file}" + echo "${cksum}" > "${cksum_file}" || die fi } @@ -409,9 +412,9 @@ multilib_prepare_wrappers() { if [[ -L ${root}/${f} ]]; then # rewrite the symlink target - local target=$(readlink "${root}/${f}") - local target_dir - local target_fn=${target##*/} + local target + target=$(readlink "${root}/${f}") || die + local target_dir target_fn=${target##*/} [[ ${target} == */* ]] && target_dir=${target%/*} @@ -453,7 +456,7 @@ multilib_prepare_wrappers() { if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then dodir "/tmp/multilib-include${dir}" # a generic template - cat > "${wrapper}" <<_EOF_ + cat > "${wrapper}" <<_EOF_ || die /* This file is auto-generated by multilib-build.eclass * as a multilib-friendly wrapper. For the original content, * please see the files that are #included below.