patch files

12 views
Skip to first unread message

Stephen Ecker

unread,
Jan 19, 2025, 12:32:13 PM1/19/25
to isar-users
I'm not certain if this is isar specific or just bitbake:  I have a patch file I've added to my layer but my build keeps erroring stating that it can't find the file to patch.  the target file is in a recipe of the same name but in a different layer.  to where should the patch file point in its second line?

thanks

Uladzimir Bely

unread,
Jan 20, 2025, 3:31:33 AM1/20/25
to Stephen Ecker, isar-users
Hello.
If you have some <recipe>.bb in some layer and <files/your.patch> for
it in your layer, you should also create in your layer
<recipe>.bbappend with the contents like:

| FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
| SRC_URI:append = " \
| file://your.patch \
| "


> --
> You received this message because you are subscribed to the Google
> Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to isar-users+...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/isar-users/47d4ffc5-3681-4567-91c7-e6533a64b893n%40googlegroups.com
> .

--
Best regards,
Uladzimir.



Stephen Ecker

unread,
Jan 20, 2025, 5:44:22 AM1/20/25
to Uladzimir Bely, isar-users
That's exactly what I did, but it always says that it could not find the file to patch.  

What should the two first lines of the path show was the directory?

Stephen Ecker

unread,
Jan 20, 2025, 5:57:45 AM1/20/25
to Uladzimir Bely, isar-users
Bb shows the directories in which it looked for the patch file... It found that.  It's the file to patch that quilt can't find: 

NOTE: Applying patch 'something.patch' (../meta-something/recipes-core/recipe-name/files/something.patch)
....
can't find file to patch at input line 3
perhaps you used the wrong -p or --strip option? 

...

It does not show the directories in which it tried to find the target file 

Maybe you could provide me an example patch file? 



On Mon, Jan 20, 2025, 2:31 AM Uladzimir Bely <ub...@ilbers.de> wrote:

Uladzimir Bely

unread,
Jan 21, 2025, 7:43:12 AM1/21/25
to Stephen Ecker, isar-users
On Mon, 2025-01-20 at 04:57 -0600, Stephen Ecker wrote:
> Bb shows the directories in which it looked for the patch file... It
> found that.  It's the file to patch that quilt can't find: 
>
> NOTE: Applying patch 'something.patch' (../meta-something/recipes-
> core/recipe-name/files/something.patch)
> ....
> can't find file to patch at input line 3
> perhaps you used the wrong -p or --strip option? 
>

This looks not related to Isar or bitbake. Your patch simply doesn't
fit sources you want to apply it to.

Stephen Ecker

unread,
Jan 21, 2025, 8:50:39 AM1/21/25
to Uladzimir Bely, isar-users
I made the patch file with the exact two files I'm trying to patch:

diff -u ../../../isar-cip-core/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partitions.script encrypt_partitions.script > encrypt_partitions.script.patch

Reply all
Reply to author
Forward
0 new messages