Using patchfiles with bitbake
Every time I try and add my own patchfiles to a bitbake recipe it fails with the following error...
No file to patch. Skipping patch.
3 out of 3 hunks ignored
Patch unifdef-native_2.6.18.patch does not apply (enforce with -f)
ERROR: Printing the environment of the function
ERROR: Error in executing:
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status: 1 Output:
Applying patch unifdef-native_2.6.18.patch
I'm creating the patch with the following command line
diff -crB unifdef.c.orig unifdef.c > unifdef-native_2.6.18.patch
and the patch file looks like
*** unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
--- unifdef.c 2010-04-14 23:20:53.874235836 -0700
***************
*** 206,212 ****
static void error(const char *); static int findsym(const char *); static void flushline(bool); ! static Linetype getline(void); static Linetype ifeval(const char **); static void ignoreoff(void); static void ignoreon(void); --- 206,212 ---- static void error(const char *); static int findsym(const char *); static void flushline(bool); ! static Linetype retrieveline(void); static Linetype ifeval(const char **); static void ignoreoff(void); static void ignoreon(void);
***************
*** 512,518 ****
for (;;) {
linenum++;
! lineval = getline();
trans_table[ifstate[depth]][lineval](); debug("process %s -> %s depth %d",
linetype_name[lineval],
--- 512,518 ----
for (;;) {
linenum++;
! lineval = retrieveline();
trans_table[ifstate[depth]][lineval](); debug("process %s -> %s depth %d",
linetype_name[lineval],
***************
*** 526,532 ****
* help from skipcomment().
*/
static Linetype
! getline(void)
{
const char *cp;
int cursym;
--- 526,532 ----
* help from skipcomment().
*/
static Linetype
! retrieveline(void)
{
const char *cp;
int cursym;
Why is this happening &how can I fix it?
Thanks
Ardy
!DSPAM:4bc6bddd15588352911731!
Quoted 12 lines · On Thursday 15 April 2010 09:18:52 Ardavon Falls wrote:
Every time I try and add my own patchfiles to a bitbake recipe it fails with the following error...
No file to patch. Skipping patch.
3 out of 3 hunks ignored
Patch unifdef-native_2.6.18.patch does not apply (enforce with -f)
ERROR: Printing the environment of the function
ERROR: Error in executing:
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status: 1 Output:
Applying patch unifdef-native_2.6.18.patch
Quoted 3 lines
I'm creating the patch with the following command line
diff -crB unifdef.c.orig
unifdef.c> unifdef-native_2.6.18.patch
Hi,
two things. The first one is you should consider using quilt as it makes your life more easy and you would avoid running into this problem.
The other part is when you compare your patch with other patches in OE, most of them start with "--- a/...", "+++ b/" and by default we invoke the patch command with "-p1" from the source directory. With your patch this does not work as you have no additional slashes that could be removed.
The way out is to either add this context (e.g. by using quilt) or to use ;pnum=0 behind your ;patch=1.
i hope this helps
z
I tried with both
*** ./files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
--- ./files/unifdef.c 2010-04-14 23:20:53.874235836 -0700
and
*** files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
--- files/unifdef.c 2010-04-14 23:20:53.874235836 -0700
neither worked :( it always failed with the same error. What is the directory that it attempts to apply the patch from? is it ${WORKDIR} or ${WORKDIR}../patches
Thanks
Ardy
Quoted 30 lines · Holger Hans Peter Freyther
Quoted 12 lines · On Thursday 15 April 2010 09:18:52 Ardavon Falls wrote:
Every time I try and add my own patchfiles to a bitbake recipe it fails with the following error...
No file to patch. Skipping patch.
3 out of 3 hunks ignored
Patch unifdef-native_2.6.18.patch does not apply (enforce with -f)
ERROR: Printing the environment of the function
ERROR: Error in executing:
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status: 1 Output:
Applying patch unifdef-native_2.6.18.patchQuoted 3 lines
I'm creating the patch with the following command line
diff -crB unifdef.c.orig
unifdef.c> unifdef-native_2.6.18.patchHi,
two things. The first one is you should consider using quilt as it makes
your life more easy and you would avoid running into this problem.The other part is when you compare your patch with other patches in OE,
most of them start with "--- a/...", "+++ b/" and by default we invoke the patch command with "-p1" from the source directory. With your patch this does not work as you have no additional slashes that could be removed.The way out is to either add this context (e.g. by using quilt) or to use ;pnum=0 behind your ;patch=1.
Quoted 10 lines
i hope this helps
z_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
!DSPAM:4bc7bf7715581674711706!
The solution was to set the patch source paths in the patch file to
*** ../../unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
--- ../../unifdef.c 2010-04-14 23:20:53.874235836 -0700
The issue was that the source path structure didn't match the directory structure in the ./tmp/work directory
Ardy
Quoted 55 lines · Ardavon Falls
I tried with both
*** ./files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
---./files/unifdef.c2010-04-14 23:20:53.874235836 -0700
and
*** files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
---files/unifdef.c2010-04-14 23:20:53.874235836 -0700neither worked :( it always failed with the same error. What is the directory that it attempts to apply the patch from? is it ${WORKDIR} or ${WORKDIR}../patches
Thanks
Ardy
Quoted 31 lines · Holger Hans Peter Freyther
Quoted 12 lines · On Thursday 15 April 2010 09:18:52 Ardavon Falls wrote:
Every time I try and add my own patchfiles to a bitbake recipe it fails with the following error...
No file to patch. Skipping patch.
3 out of 3 hunks ignored
Patch unifdef-native_2.6.18.patch does not apply (enforce with -f)
ERROR: Printing the environment of the function
ERROR: Error in executing:
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status:
1 Output:
Applying patch unifdef-native_2.6.18.patchQuoted 3 lines
I'm creating the patch with the following command line
diff -crB unifdef.c.orig
unifdef.c> unifdef-native_2.6.18.patchHi,
two things. The first one is you should consider using quilt as it makes
your life more easy and you would avoid running into this problem.The other part is when you compare your patch with other patches in OE,
most of them start with "--- a/...", "+++ b/" and by default we invoke
the patch command with "-p1" from the source directory. With your patch this does not work as you have no additional slashes that could be removed.The way out is to either add this context (e.g. by using quilt) or to use ;pnum=0 behind your ;patch=1.
Quoted 7 lines
i hope this helps
z_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 7 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
!DSPAM:4bc7e3b915581124413756!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 10 lines · Ardavon Falls
I tried with both
*** ./files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
---./files/unifdef.c2010-04-14 23:20:53.874235836 -0700
and
*** files/unifdef.c.orig 2010-04-14 23:19:41.824235628 -0700
---files/unifdef.c2010-04-14 23:20:53.874235836 -0700neither worked :( it always failed with the same error. What is the directory that it attempts to apply the patch from? is it ${WORKDIR} or ${WORKDIR}../patches
It applies from ${S}
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLyAhSMkyGM64RGpERAh9iAJ4lM/sJ7YvPuP482tYKAx7eCilEbwCgqbcx ij8qS7IS7Ysid/fSMlt6wlU=
=DrJ6
-----END PGP SIGNATURE-----