From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] 2016.11-rc2 with really old versions of bash (RHEL5)
Date: Sat, 19 Nov 2016 09:39:09 +0100 [thread overview]
Message-ID: <20161119083909.GA3614@free.fr> (raw)
In-Reply-To: <7725a865-0665-5747-6bfb-518224e3825b@mind.be>
Arnout, All,
On 2016-11-17 23:41 +0100, Arnout Vandecappelle spake thusly:
> On 17-11-16 00:13, Yann E. MORIN wrote:
> > Ricardo, All,
> >
> > On 2016-11-16 20:48 -0200, Ricardo Martincoski spake thusly:
> >> Do you see the issue described below? Maybe I am doing something wrong.
> >> What bash version do you have in your RHEL5 servers?
> >>
> >> All,
> >>
> >> Ancient versions of bash don't support 'Associative arrays', leading to build
> >> error using 2016.11-rc2 in a plain vanilla RHEL5.
> >
> > Asociative arrays were introduced in bash-4.0, indeed.
> >
> > Doing without associative arrays is not very easy. Rather, it would be
> > very difficult.
>
> The associative arrays can be overcome relatively easily with eval;
Well, I am fully aware we could do it that way. That's not something I'd
have called "easy", though. It is technically easy, but the maintenance
burden is higher (as it is a trick).
> the indexed
> array BR2_EXT_NAMES would be trickier to remove.
Indexed arrays have been there since at least 3.0, released in 2004, so
even RHEL4 should have it...
> This is possible because we
> require the names to be only [A-Za-z0-9_] so they can be used as variable names.
Right. It's fortunate that kconfig does not allow variable names with a
dash or I'd have allowed that as well.
> The idea is to do:
>
> - BR2_EXT_PATHS["${br2_name}"]="${br2_ext}"
> + eval BR2_EXT_PATH_${br2_name}='"${br2_ext}"'
>
> and
>
> - printf ' %s' "${BR2_EXT_PATHS["${br2_name}"]}"
> + eval "printf ' %s' \"\${BR2_EXT_PATH_${br2_name}}\""
>
> It's horribly ugly, but it does work. Well, at least I think so :-)
Yes, something like this would work. But as you said, it is relatively
ugly. I had to maintain such a trick in the past and this is just a
nightmare...
For the records, RHEL5 standard support deadline in in March 2017, 4
months from now, but extended support is expected until 2021...
But oh well... We still need to know whether we still consider RHEL5 as
our oldest (unoffocially) supported platform, or if we just bite the
bullet and require bash-4.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-11-19 8:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-13 20:07 [Buildroot] Buildroot 2016.11-rc2 released Thomas Petazzoni
2016-11-16 22:48 ` [Buildroot] 2016.11-rc2 with really old versions of bash (RHEL5) Ricardo Martincoski
2016-11-16 23:13 ` Yann E. MORIN
2016-11-17 22:41 ` Arnout Vandecappelle
2016-11-19 8:39 ` Yann E. MORIN [this message]
2016-11-19 9:05 ` Arnout Vandecappelle
2016-11-19 9:22 ` Yann E. MORIN
2016-11-16 23:14 ` Max Filippov
2016-11-17 22:43 ` Arnout Vandecappelle
2016-11-18 4:50 ` Ricardo Martincoski
2016-11-18 11:19 ` Thomas De Schampheleire
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=20161119083909.GA3614@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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