View previous topic :: View next topic |
Author |
Message |
DeIM Guru
Joined: 11 Apr 2006 Posts: 442
|
Posted: Thu Sep 19, 2024 8:31 am Post subject: custom ebuild - eapply FAILED, but patch -p1 < patch OK |
|
|
Hi, I noticed problem with custom ebuild:
I made modified ebuild for gentoo-sources adding custom patch adding just:
Code: | src_prepare() {
default
eapply "${FILESDIR}/custom-${PV}.patch"
} |
I'm getting:
1 out of 19 hunks FAILED -- saving rejects to file kernel/sched/fair.c.rej
patch -p1 failed with [...]/custom-6.11.0.patch
But when I emerge gentoo-sources without this patch in ebuild and then in kernel folder:
Code: | patch -p1 < custom-6.11.0.patch |
It succeeds without fail.
Noticed in kernel version 6.11.0 last successfully tried was 6.10.5. |
|
Back to top |
|
|
netfab Veteran
Joined: 03 Mar 2005 Posts: 1956 Location: 127.0.0.1
|
Posted: Thu Sep 19, 2024 11:07 am Post subject: |
|
|
Hi,
I don't know why you're getting a failure, but you don't need to create a custom ebuild just to add a patch.
See /etc/portage/patches. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2405
|
Posted: Thu Sep 19, 2024 11:53 am Post subject: |
|
|
That's most probably because some other patch that affects the sources your patch is targeting is still not applied.
However as mentioned above you don't need to create a separate ebuild to apply user patches. See the link.
Also you may be overriding src_prepare altogether, depending on the order of inherited eclasses. When calling default or not calling a phase at all, the one that's defined from the last eclass inherited(or the last inherited eclass that defines it) will be executed. What is your inherits line?
Maybe try calling kernel-2_src_prepare first.
Best Regards,
Georgi |
|
Back to top |
|
|
|