commit:     c4d6bd8fc2cc8a5d7bd6d53cd05cff30a60d2ba1
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  8 15:28:42 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Sun Jun  8 16:32:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4d6bd8f

sys-devel/patch: fix incorrect reliance on split-usr

It hardcodes a compile-time path to `ed`. This is known and handled
already because ${ED} is part of portage and does not point to `ed`. But
the "fix" was to do a $PATH lookup, which in turn broke binpackage
hosting (and profile migration, likely).

The package doesn't have USE=split-usr and we shouldn't add one just for
this. Make sure the portable API filename is used.

Bug: https://bugs.gentoo.org/470210
Closes: https://bugs.gentoo.org/957593
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 sys-devel/patch/{patch-2.7.6-r7.ebuild => patch-2.7.6-r8.ebuild} | 5 +++--
 sys-devel/patch/{patch-2.8.ebuild => patch-2.8-r1.ebuild}        | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/sys-devel/patch/patch-2.7.6-r7.ebuild 
b/sys-devel/patch/patch-2.7.6-r8.ebuild
similarity index 94%
rename from sys-devel/patch/patch-2.7.6-r7.ebuild
rename to sys-devel/patch/patch-2.7.6-r8.ebuild
index 5086678d2663..6ecba54d4ddd 100644
--- a/sys-devel/patch/patch-2.7.6-r7.ebuild
+++ b/sys-devel/patch/patch-2.7.6-r8.ebuild
@@ -68,8 +68,9 @@ src_configure() {
                # rename to gpatch for better BSD compatibility
                --program-prefix=g
        )
-       # Do not let $ED mess up the search for `ed` 470210.
-       ac_cv_path_ED=$(type -P ed) \
+       # Do not let $ED or $PATH (split-usr) mess up the search for `ed`:
+       # bug 470210 / bug 957593
+       ac_cv_path_ED="${EPREFIX}/bin/ed" \
                econf "${myeconfargs[@]}"
 }
 

diff --git a/sys-devel/patch/patch-2.8.ebuild 
b/sys-devel/patch/patch-2.8-r1.ebuild
similarity index 93%
rename from sys-devel/patch/patch-2.8.ebuild
rename to sys-devel/patch/patch-2.8-r1.ebuild
index 2eceb5f47355..30b3eb9f3a66 100644
--- a/sys-devel/patch/patch-2.8.ebuild
+++ b/sys-devel/patch/patch-2.8-r1.ebuild
@@ -58,8 +58,9 @@ src_configure() {
                # rename to gpatch for better BSD compatibility
                --program-prefix=g
        )
-       # Do not let $ED mess up the search for `ed` 470210.
-       ac_cv_path_ED=$(type -P ed) \
+       # Do not let $ED or $PATH (split-usr) mess up the search for `ed`:
+       # bug 470210 / bug 957593
+       ac_cv_path_ED="${EPREFIX}/bin/ed" \
                econf "${myeconfargs[@]}"
 }
 

Reply via email to