diff --git a/portage-2.2.27/bin/phase-helpers.sh b/portage-2.2.27/bin/phase-helpers.sh index 80f5946..69dfe4b 100644 --- a/portage-2.2.27/bin/phase-helpers.sh +++ b/portage-2.2.27/bin/phase-helpers.sh @@ -987,6 +987,9 @@ if ___eapi_has_eapply; then _eapply_patch() { local f=${1} local prefix=${2} + local prepend="" + + type -P gpatch > /dev/null && prepend="g" started_applying=1 ebegin "${prefix:-Applying }${f##*/}" @@ -995,7 +998,7 @@ if ___eapi_has_eapply; then # -s to silence progress output # -g0 to guarantee no VCS interaction # --no-backup-if-mismatch not to pollute the sources - patch -p1 -f -s -g0 --no-backup-if-mismatch \ + ${prepend}patch -p1 -f -s -g0 --no-backup-if-mismatch \ "${patch_options[@]}" < "${f}" failed=${?} if ! eend "${failed}"; then