commit:     7be943845774aa9e052e2d16241991a3abb9d8d6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  5 18:36:37 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep  5 19:58:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7be94384

llvm.org.eclass: Fix handling patchset with only one component

Fix the irrelevant patch removal logic not to invoke rm(1) with no
arguments if the patchset contains only patches for the current
component.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/llvm.org.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 7d4765b31ac8..ba75866507e2 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -378,7 +378,7 @@ llvm.org_src_unpack() {
                local IFS='|'
                grep -E -r -L "^Gentoo-Component:.*(${components[*]})" \
                        "${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" |
-                       xargs rm
+                       xargs -r rm
                local status=( "${PIPESTATUS[@]}" )
                [[ ${status[1]} -ne 0 ]] && die "rm failed"
                [[ ${status[0]} -ne 0 ]] &&

Reply via email to