Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] eclass/tests: Fix inheriting multiple eclasses
Date: Sat, 01 Jul 2017 16:22:45
Message-Id: 20170701161755.7792-1-mgorny@gentoo.org
1 Fix the inherit function to correctly handle 'inherit' call with
2 multiple eclasses, instead of returning after the first eclass is
3 successfully sourced.
4 ---
5 eclass/tests/tests-common.sh | 4 ++--
6 1 file changed, 2 insertions(+), 2 deletions(-)
7
8 diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh
9 index 8141425a0dcb..d52cf3a2687b 100644
10 --- a/eclass/tests/tests-common.sh
11 +++ b/eclass/tests/tests-common.sh
12 @@ -17,11 +17,11 @@ inherit() {
13 local eclass=${path}/${e}.eclass
14 if [[ -e "${eclass}" ]] ; then
15 source "${eclass}"
16 - return 0
17 + continue 2
18 fi
19 done
20 + die "could not find ${e}.eclass"
21 done
22 - die "could not find ${eclass}"
23 }
24 EXPORT_FUNCTIONS() { :; }
25
26 --
27 2.13.2