Bug 3478 - linux-yocto do_patch fails for a custom qemu bsp created with yocto-bsp
Summary: linux-yocto do_patch fails for a custom qemu bsp created with yocto-bsp
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4 M2
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-11-22 17:49 UTC by Stefan Stanacar
Modified: 2013-01-17 14:01 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
log.do_patch (18.96 KB, application/octet-stream)
2012-11-22 17:49 UTC, Stefan Stanacar
no flags Details
run.do_patch (18.96 KB, application/octet-stream)
2012-11-22 17:53 UTC, Stefan Stanacar
no flags Details
my meta bsp layer as generated by yocto-bsp (5.10 KB, application/x-gzip)
2012-11-23 09:51 UTC, Stefan Stanacar
no flags Details
failing meta-testqemux86 with fedora17 (5.10 KB, application/x-gzip)
2012-11-26 20:08 UTC, Tom Zanussi
no flags Details
pending fix (1.57 KB, patch)
2012-11-26 21:49 UTC, Bruce Ashfield
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Stanacar 2012-11-22 17:49:37 UTC
Created attachment 946 [details]
log.do_patch

Steps to reproduce:

 - Use yocto-bsp to create a qemu based bsp 
 - Set MACHINE in local.conf and add the new meta layer in BBLAYERS
 - bitbake core-image-minimal

Results: linux-yocto task fails at do_patch. 


[stefans@firebird yotta]$ yocto-bsp create myqemux86-64 qemu -o ../../meta-myqemux86-64
Which qemu architecture would you like to use? [default: i386]
	1) i386    (32-bit)
	2) x86_64  (64-bit)
	3) ARM     (32-bit)
	4) PowerPC (32-bit)
	5) MIPS    (32-bit)
2

[...  choose default option for all the rest, I tested it with both i386 and x86_64]

[stefans@firebird yotta]$ bitbake core-image-minimal

BB_VERSION        = "1.16.0"
TARGET_ARCH       = "x86_64"
TARGET_OS         = "linux"
MACHINE           = "myqemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3+snapshot-20121122"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(nobranch):0d7d413d64bab8d3c758414c6c8c653ccc325653"
meta-myqemux86-64 = "<unknown>:<unknown>"



| [INFO] validating against known patches  (myqemux86-64-standard-meta)
| error: Your local changes to the following files would be overwritten by checkout:
| 	meta/meta-series
| 	meta/meta-series.wrap
| Please, commit your changes or stash them before you can switch branches.
| Aborting
| ERROR: could not checkout branch standard/base
| ERROR. could not update git tree
| ERROR. Could not apply patches for myqemux86-64.
|        Patch failures can be resolved in the devshell (bitbake -c devshell linux-yocto)
| ERROR: Function failed: do_patch (see /home/stefans/yocto/builds/yotta/tmp/work/myqemux86_64-poky-linux/linux-yocto/3.4.18+git1+553a8512fd924420db5cc2320ece4a6fd9b1e486_1+f1c2320544eaffd6ecc7fcb8b18f8a0ed4ba2e14-r4.3.1/temp/log.do_patch.23961 for further information)
ERROR: Task 693 (/home/stefans/yocto/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb, do_patch) failed with exit code '1'
Comment 1 Stefan Stanacar 2012-11-22 17:53:44 UTC
Created attachment 947 [details]
run.do_patch
Comment 2 Bruce Ashfield 2012-11-22 18:04:50 UTC
We've seen this one before. But can't reproduce it. I'll grab the bug.
Comment 3 Bruce Ashfield 2012-11-22 18:05:59 UTC
Can you dump the details of your host distro into the bug ? This has been seen on F17, but can't be reproduce
on ubuntu, so I'd like to get the details of your setup.
Comment 4 Stefan Stanacar 2012-11-22 18:07:06 UTC
Aargh, silly me, I always forget that. Yup, it's F17 x64.
Comment 5 Bruce Ashfield 2012-11-22 18:07:58 UTC
ok. That's consistent. I need to hunt up a F17 box and test there. Should be easy to fix, if I can just
make it happen in front of me.
Comment 6 Bruce Ashfield 2012-11-22 21:54:42 UTC
Can you attach your yocto-bsp generated layer ? I used one from Tomz:

yow-lpgbld-vm44 [/buildarea/bruce/poky/build]> bitbake -c kernel_configme linux-yocto
Loading cache: 100% |##################################################################################################| ETA:  00:00:00
Loaded 1115 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.16.0"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "myqemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3+snapshot-20121122"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    
meta-myqemux86    = "master:14f7c9c9d87e1a9b0c20d78d528068fd9f1a27cf"

And I don't get the failures. This is on a F17 box:

> cat /etc/issue
Fedora release 17 (Beefy Miracle)
Comment 7 Bruce Ashfield 2012-11-22 21:58:05 UTC
Linux yow-lpgbld-vm44 3.4.6-2.fc17.i686.PAE #1 SMP Thu Jul 19 21:49:03 UTC 2012 i686 i686 i386 GNU/Linux
Comment 8 Stefan Stanacar 2012-11-23 09:51:02 UTC
Created attachment 949 [details]
my meta bsp layer as generated by yocto-bsp
Comment 9 Stefan Stanacar 2012-11-23 09:58:36 UTC
I just noticed that you're on a different commit than me (see my first comment). My commit is 0d7d413d64bab8d3c758414c6c8c653ccc325653, i will try  14f7c9c9d87e1a9b0c20d78d528068fd9f1a27cf and see if I get the same results.
Comment 10 Stefan Stanacar 2012-11-23 10:09:33 UTC
Indeed with the latest master:14f7c9c9d87e1a9b0c20d78d528068fd9f1a27cf I can't reproduce it any more.
Comment 11 Bruce Ashfield 2012-11-23 21:25:16 UTC
Aha. So the tools updates in the latest master do take care of it, that is what
I had hoped.

Do we want to mark this as fixed .. and reopen it if it reappears ?
Comment 12 Tom Zanussi 2012-11-26 16:50:52 UTC
It still happens with danny and needs to be fixed there.

If it's fixed in master, do we know which commits to apply from master to fix it in danny (and more importantly why?)
Comment 13 Bruce Ashfield 2012-11-26 16:53:34 UTC
I can't make it happen on any branch with F17. I'll try danny again, but Tom can you attach your BSP layer here as well ?
Comment 14 Tom Zanussi 2012-11-26 20:08:27 UTC
Created attachment 950 [details]
failing meta-testqemux86 with fedora17

Added my failing BSP layer, error message below...

ERROR: Function failed: do_patch (see /home/trz/yocto/poky-danny-git/build/tmp/work/testqemux86-poky-linux/linux-yocto-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a5554b81cc8ad23267d-r4.3.1/temp/log.do_patch.7499 for further information)
ERROR: Logfile of failure stored in: /home/trz/yocto/poky-danny-git/build/tmp/work/testqemux86-poky-linux/linux-yocto-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a5554b81cc8ad23267d-r4.3.1/temp/log.do_patch.7499
Log data follows:
| DEBUG: Executing shell function do_patch
| Deleted branch meta-temp (was 580ac9c).
| warning: could not find (or was already included): features/kprobes/kprobes.scc (/home/trz/yocto/poky-danny-git/build/tmp/work/testqemux86-poky-linux/linux-yocto-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a5554b81cc8ad23267d-r4.3.1/linux/meta/cfg/kernel-cache/features/systemtap)
| warning: could not find (or was already included): user-patches.scc (/home/trz/yocto/poky-danny-git/build/tmp/work/testqemux86-poky-linux/linux-yocto-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a5554b81cc8ad23267d-r4.3.1/linux/meta/cfg/scratch/obj/home/trz/yocto/poky-danny-git/meta-testqemux86/recipes-kernel/linux/files)
| [INFO] validating against known patches  (testqemux86-standard-meta)
| error: Your local changes to the following files would be overwritten by checkout:
| 	meta/meta-series
| 	meta/meta-series.wrap
| Please, commit your changes or stash them before you can switch branches.
| Aborting
| ERROR: could not checkout branch standard/base
| ERROR. could not update git tree
| ERROR. Could not apply patches for testqemux86.
|        Patch failures can be resolved in the devshell (bitbake -c devshell linux-yocto)
| ERROR: Function failed: do_patch (see /home/trz/yocto/poky-danny-git/build/tmp/work/testqemux86-poky-linux/linux-yocto-3.4.11+git1+a201268353c030d9fafe00f2041976f7437d9386_1+449f7f520350700858f21a5554b81cc8ad23267d-r4.3.1/temp/log.do_patch.7499 for further information)
ERROR: Task 824 (/home/trz/yocto/poky-danny-git/meta/recipes-kernel/linux/linux-yocto_3.4.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2509 tasks of which 250 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/trz/yocto/poky-danny-git/meta/recipes-kernel/linux/linux-yocto_3.4.bb, do_patch
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 15 Bruce Ashfield 2012-11-26 20:09:57 UTC
Perfect. I have a preliminary fix now, and am testing some extra layers and BSPs.
Comment 16 Bruce Ashfield 2012-11-26 21:48:42 UTC
This is fixed locally, I'll send a patch to master and danny in the morning. The preliminary patch is attached in case anyone is interested to try it sooner (0001-kernel-yocto-checkout-known-branch-before-leaving-do.patch)
Comment 17 Bruce Ashfield 2012-11-26 21:49:17 UTC
Created attachment 951 [details]
pending fix
Comment 18 Tom Zanussi 2012-11-27 04:57:54 UTC
Tested the pending fix and it worked fine with the previously failing testqemux86 layer on Fedora17.
Comment 19 Stefan Stanacar 2012-11-27 09:46:47 UTC
Same here, tested the pending fix and it worked fine on my F17.
Comment 20 Bruce Ashfield 2012-11-29 19:20:35 UTC
patch sent to oe-core for danny and master
Comment 21 Stefan Stanacar 2013-01-17 14:01:05 UTC
Verified.