1 |
commit: 0b3c67984e6d45e44b130e2cdc71db8577d058f5 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 30 17:16:00 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 17:19:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b3c6798 |
7 |
|
8 |
llvm.org.eclass: Fix patch removal test |
9 |
|
10 |
Fix the test for patch removal to detect non-matching patches correctly. |
11 |
-s is not a reliable test for empty directories. However, grep |
12 |
indicates whether at least one match was found, so it should be good |
13 |
enough for us. |
14 |
|
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
|
17 |
eclass/llvm.org.eclass | 13 ++++--------- |
18 |
1 file changed, 4 insertions(+), 9 deletions(-) |
19 |
|
20 |
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass |
21 |
index 2c5f1f9b79e5..fa23782cc244 100644 |
22 |
--- a/eclass/llvm.org.eclass |
23 |
+++ b/eclass/llvm.org.eclass |
24 |
@@ -300,15 +300,10 @@ llvm.org_src_unpack() { |
25 |
grep -E -r -L "^Gentoo-Component:.*(${components[*]})" \ |
26 |
"${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" | |
27 |
xargs rm |
28 |
- assert |
29 |
- |
30 |
- if ver_test -ge 13.0.1_rc3; then |
31 |
- # fail if no patches remain |
32 |
- if [[ ! -s ${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET} ]] |
33 |
- then |
34 |
- die "No patches in the patchset apply to the package" |
35 |
- fi |
36 |
- fi |
37 |
+ local status=( "${PIPESTATUS[@]}" ) |
38 |
+ [[ ${status[1]} -ne 0 ]] && die "rm failed" |
39 |
+ [[ ${status[0]} -ne 0 ]] && |
40 |
+ die "No patches in the patchset apply to the package" |
41 |
fi |
42 |
} |