Bug 9687

Summary: [Test Case 1099] Check if build succeeded when project release is changed
Product: [Build System, Metadata & Runtime] Toaster Reporter: Libertad <libertad.gonzalez.de.la.cruz>
Component: toasterAssignee: brian avery <brian.avery>
Status: RESOLVED WONTFIX QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: critical    
Priority: Medium+ CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: 2.0.2   
Target Milestone: 2.0.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Console logs none

Description Libertad 2016-05-30 20:08:11 UTC
DESCRIPTION:

Toaster is not building for Yocto Project 1.8 Fido

When trying to build for Yocto Project 1.8 Fido following the steps below it returns the following error:

******
command: git clone "/home/libby/Toaster202/poky/bitbake/bin" "/home/libby/Toaster202/poky/bitbake/bin/_toaster_clones/_http___git.yoctoproject.org_git_poky_fido" 
fatal: repository '/home/libby/Toaster202/poky/bitbake/bin' does not exist
******


BUILD: 2.0.2: dade0e68c645473d94e1b05020b064df40677e81
ENVIRONMENT: 'Debian 4.3.5-1~bpo8+1'
STEPS TO REPRODUCE: 
  
Start toaster in project mode (TC: 1060, by running ./poky/bitbake/bin/toaster)
Create a new project with release set on "Local Yocto Project"
Do a core-image-minimal build for qemux86 machine
Once the build is finished, change the project release to "Yocto Project 1.8 Fido"
Do a core-image-minimal build for qemux86 machine
Toaster should be able to build the images for both releases



EXPECTED OUTCOME: 
  
Toaster must be able to build images on all available project releases.
Comment 1 Libertad 2016-06-02 17:41:15 UTC
Created attachment 3210 [details]
Console logs

This is the log from the console
Comment 2 Libertad 2016-06-02 18:47:54 UTC
DESCRIPTION:

Toaster is not building for Yocto Project 1.8 Fido

When trying to build for Yocto Project 1.8 Fido following the steps below it returns the following error:

******
command: git clone "/home/libby/Toaster202_2/poky/bitbake/bin" "/home/libby/Toaster202_2/poky/bitbake/bin/_toaster_clones/_http___git.yoctoproject.org_git_poky_fido" 
fatal: repository '/home/libby/Toaster202_2/poky/bitbake/bin' does not exist
******


BUILD: 2.0.2: dade0e68c645473d94e1b05020b064df40677e81
ENVIRONMENT: 'Debian 4.3.5-1~bpo8+1'
STEPS TO REPRODUCE: 
  
1. Start toaster in project mode (TC: 1060, by running ./poky/bitbake/bin/toaster)
2. Create a new project with release set on "Yocto Project 1.8 Fido"
3. Do a core-image-minimal build for qemux86 machine


The attachment "Console logs" holds the output logs.
Comment 3 Libertad 2016-06-02 19:35:30 UTC
It also does not work for master projects 

1. Start toaster in project mode (TC: 1060, by running ./poky/bitbake/bin/toaster)
2. Create a new project with release set on "Yocto Project master"
3. Do a core-image-minimal build for qemux86 machine

ERROR: 
command: git clone "/home/libby/Toaster202_2/poky/bitbake/bin" "/home/libby/Toaster202_2/poky/bitbake/bin/_toaster_clones/_http___git.yoctoproject.org_git_poky_master" 
fatal: repository '/home/libby/Toaster202_2/poky/bitbake/bin' does not exist
Comment 4 Belen Barros Pena 2016-06-03 08:16:19 UTC
A 2.0.x release not building with master in expected. As part of the fix for this bug, we should remove the master release from the toasterconf.json files so that the master release does not appear as an option users can select.

The Fido thing we need to look into. 

Thanks!
Comment 5 Elliot Smith 2016-06-15 15:43:05 UTC
I have looked into the fido case.

I was not able to reproduce the bug, but did get this error instead:

=======================
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, TMPDIR has changed its layout version number (11 to 10) and you need to either rebuild, revert or adjust it at your own risk.
=======================

This caused my Toaster build to fail.

To fix this, we could manually clean TMPDIR from Toaster when the release changes (probably quite a lot of work to cover a tiny corner case) or disable sanity checks (probably a really bad idea).

Alternatively, we could just prevent changing the release for a project after it has been created, as we've done in current Toaster.
Comment 6 Elliot Smith 2016-06-16 13:52:41 UTC
Assigning to Brian for a comment on whether to just remove this functionality, so Toaster 2.0.* matches Toaster master.
Comment 7 brian avery 2016-06-16 18:31:03 UTC
1) I agree with Belen that "As part of the fix for this bug, we should remove the master release from the toasterconf.json" for the 2.0 release.
2) As far as tmp goes, this is the same behaviour you'd get if you just did a git pull on a new release of poky and kept the same build environment so I'm ok with the sanity check that tells the user to either rm the tmp dir by hand or override sanity.conf (which usually failed for me when I tried it in the past).
Comment 8 brian avery 2016-06-22 15:27:23 UTC
If you need to workaround this issue:
1) from a console remove the tmp dir in the toaster dir.
2) then you should be able to change releases or even better, make a new project for the release you want to try.

If you have pulled in some layers, they may not have branches for Jetrho, for instance, if you try to switch from Fido to Jethro; so you are safer to make a new project and import the layers again.