From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:multilib-eapi6 commit in: eclass/
Date: Sun, 6 Dec 2015 17:19:58 +0000 (UTC) [thread overview]
Message-ID: <1449422101.e98a0b87dbe1a99a1a7ac2410737ed0858129ffe.mgorny@gentoo> (raw)
commit: e98a0b87dbe1a99a1a7ac2410737ed0858129ffe
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 6 15:21:00 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> 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.
next reply other threads:[~2015-12-06 17:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-06 17:19 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-12-06 17:56 [gentoo-commits] repo/gentoo:multilib-eapi6 commit in: eclass/ Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:56 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 17:19 Michał Górny
2015-12-06 16:15 [gentoo-commits] repo/gentoo:master " Michał Górny
2015-12-06 17:19 ` [gentoo-commits] repo/gentoo:multilib-eapi6 " Michał Górny
2015-12-06 15:41 Michał Górny
2015-12-06 15:34 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449422101.e98a0b87dbe1a99a1a7ac2410737ed0858129ffe.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox