Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v3] bash-completion-r1.eclass: Add EAPI 8 support
Date: Fri, 16 Jul 2021 17:17:32
Message-Id: upmviji02@gentoo.org
In Reply to: [gentoo-dev] [PATCH v3] bash-completion-r1.eclass: Add EAPI 8 support by "Michał Górny"
1 >>>>> On Fri, 16 Jul 2021, Michał Górny wrote:
2
3 > case ${EAPI:-0} in
4
5 This could be simplified to ${EAPI}.
6
7 > - 0|1|2|3|4|5|6|7) ;;
8 > - *) die "EAPI ${EAPI} unsupported (yet)."
9 > + 5|6|7|8) ;;
10 > + *) die "EAPI ${EAPI} unsupported."
11 > esac
12
13 Add the eclass name to the message? Other eclasses have this:
14
15 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
16
17 Also, the ;; is missing in the last clause. If that it working, then at
18 least it is undocumented behaviour. The Bash manual explicitly says that
19 "[e]ach clause must be terminated".
20
21 > +
22 > +_BASH_COMPLETION_R1_ECLASS=1
23 > +fi
24
25 This assignment belongs immediately after the corresponding check,
26 before any inherits. Otherwise, it won't prevent inherit circles.
27
28 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature