Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
custom ebuild - eapply FAILED, but patch -p1 < patch OK
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 439

PostPosted: Thu Sep 19, 2024 8:31 am    Post subject: custom ebuild - eapply FAILED, but patch -p1 < patch OK Reply with quote

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
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1947
Location: 127.0.0.1

PostPosted: Thu Sep 19, 2024 11:07 am    Post subject: Reply with quote

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
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2218

PostPosted: Thu Sep 19, 2024 11:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum