From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH v2] eapi7-ver.eclass: Support EAPIs 0 to 6.
Date: Tue, 8 May 2018 21:39:16 +0200 [thread overview]
Message-ID: <23281.64740.534730.453494@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <23281.63386.856647.378020@a1i15.kph.uni-mainz.de>
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
---
Sorry, I had sent the wrong patch.
eclass/eapi7-ver.eclass | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass
index 6117124a90a5..43b6a4122506 100644
--- a/eclass/eapi7-ver.eclass
+++ b/eclass/eapi7-ver.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: eapi7-ver.eclass
@@ -58,12 +58,8 @@
# the version string, it is truncated silently.
case ${EAPI:-0} in
- 0|1|2|3|4|5)
- die "${ECLASS}: EAPI=${EAPI:-0} not supported";;
- 6)
- ;;
- *)
- die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass";;
+ 0|1|2|3|4|5|6) ;;
+ *) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;;
esac
# @FUNCTION: _ver_parse_range
@@ -139,7 +135,10 @@ ver_cut() {
if [[ ${start} -gt 0 ]]; then
start=$(( start*2 - 1 ))
fi
- echo "${comp[*]:start:end*2-start}"
+ # Work around a bug in bash-3.2, where "${comp[*]:start:end*2-start}"
+ # inserts spurious 0x7f characters for empty array elements
+ local out=( "${comp[@]:start:end*2-start}" )
+ echo "${out[*]}"
}
# @FUNCTION: ver_rs
--
2.17.0
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2018-05-08 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 19:16 [gentoo-dev] [PATCH] eapi7-ver.eclass: Support EAPIs 0 to 6 Ulrich Müller
2018-05-08 19:39 ` Ulrich Müller [this message]
2018-05-09 0:25 ` [gentoo-dev] Re: [PATCH v2] " Duncan
2018-05-09 8:19 ` [gentoo-dev] [PATCH v3] " Ulrich Müller
2018-05-13 22:40 ` [gentoo-dev] " Ulrich Mueller
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=23281.64740.534730.453494@a1i15.kph.uni-mainz.de \
--to=ulm@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