summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-03-30 19:16:00 +0200
committerMichał Górny <mgorny@gentoo.org>2022-03-30 19:19:57 +0200
commit0b3c67984e6d45e44b130e2cdc71db8577d058f5 (patch)
tree934d3ffa54f8ed8c53facffa66f67d26ddb2dced /eclass
parentx11-libs/motif: Fix build with slibtool (diff)
downloadgentoo-0b3c67984e6d45e44b130e2cdc71db8577d058f5.tar.gz
gentoo-0b3c67984e6d45e44b130e2cdc71db8577d058f5.tar.bz2
gentoo-0b3c67984e6d45e44b130e2cdc71db8577d058f5.zip
llvm.org.eclass: Fix patch removal test
Fix the test for patch removal to detect non-matching patches correctly. -s is not a reliable test for empty directories. However, grep indicates whether at least one match was found, so it should be good enough for us. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/llvm.org.eclass13
1 files changed, 4 insertions, 9 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 2c5f1f9b79e5..fa23782cc244 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -300,15 +300,10 @@ llvm.org_src_unpack() {
grep -E -r -L "^Gentoo-Component:.*(${components[*]})" \
"${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" |
xargs rm
- assert
-
- if ver_test -ge 13.0.1_rc3; then
- # fail if no patches remain
- if [[ ! -s ${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET} ]]
- then
- die "No patches in the patchset apply to the package"
- fi
- fi
+ local status=( "${PIPESTATUS[@]}" )
+ [[ ${status[1]} -ne 0 ]] && die "rm failed"
+ [[ ${status[0]} -ne 0 ]] &&
+ die "No patches in the patchset apply to the package"
fi
}