commit:     8708b665d4721482dcc4efb72309e0c4237613b4
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri May 30 06:36:35 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  1 21:42:00 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8708b665

phase-helpers.sh: tweak the calling convention for _eapply_patch()

Have the _eapply_patch() helper function treat the first operand as the
prefix, rather than the second.

# BEFORE
_eapply_patch "${patch}" "${prefix}" "${patch_options[@]}"

# AFTER
_eapply_patch "${prefix}" "${patch}" "${patch_options[@]}"

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/phase-helpers.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 7defd9f984..a3f7050e9f 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -982,7 +982,7 @@ if ___eapi_has_eapply; then
                local -a operands options
 
                _eapply_patch() {
-                       local patch=$1 prefix=$2
+                       local prefix=$1 patch=$2
                        local -a patch_opts
                        shift 2
 
@@ -1042,14 +1042,14 @@ if ___eapi_has_eapply; then
                                                if (( i++ == 0 )); then
                                                        einfo "Applying patches 
from ${path} ..."
                                                fi
-                                               _eapply_patch "${f}" '  ' 
"${options[@]}" || return
+                                               _eapply_patch '  ' "${f}" 
"${options[@]}" || return
                                        fi
                                done
                                if (( i == 0 )); then
                                        die "No *.{patch,diff} files in 
directory ${path}"
                                fi
                        else
-                               _eapply_patch "${path}" '' "${options[@]}" || 
return
+                               _eapply_patch '' "${path}" "${options[@]}" || 
return
                        fi
                done
        }

Reply via email to