Bug 9425 - Custom image cannot be downloaded until after it is built
Summary: Custom image cannot be downloaded until after it is built
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.2 M3
Assignee: Michael Wood
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-08 09:53 UTC by Elliot Smith
Modified: 2016-08-16 09:50 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Error in "Download recipe file" button (116.48 KB, image/png)
2016-07-19 22:29 UTC, Libertad
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elliot Smith 2016-04-08 09:53:32 UTC
Custom image recipe files cannot be downloaded from any of the links in Toaster where it should be possible to download them, until after the custom image is built.

To reproduce:

1. Start Toaster.
2. Create a project.
3. Create a custom image for the project based on core-image-minimal.
4. Try to download the custom image (project > configuration > custom images > click download icon next to custom image file name).

Expected: custom image file starts to download
Actual: Django error, as below:

IOError at /toastergui/project/1/customrecipe/13317/download
[Errno 2] No such file or directory: u'recipes-core/images/core-image-minimal.bb'
Request Method:	GET
Request URL:	http://minos.isw.intel.com:8888/toastergui/project/1/customrecipe/13317/download
Django Version:	1.8.11
Exception Type:	IOError
Exception Value:	
[Errno 2] No such file or directory: u'recipes-core/images/core-image-minimal.bb'
Exception Location:	/home/elliot/poky-contrib/bitbake/lib/toaster/orm/models.py in generate_recipe_file_contents, line 1558
Python Executable:	/home/elliot/poky-virtualenv/bin/python
Python Version:	2.7.6
Python Path:	
['../bitbake/bin/../lib',
 '/home/elliot/poky-contrib/bitbake/lib',
 '/home/elliot/poky-contrib/bitbake/lib/toaster',
 '/home/elliot/poky-virtualenv/lib/python2.7',
 '/home/elliot/poky-virtualenv/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/elliot/poky-virtualenv/lib/python2.7/lib-tk',
 '/home/elliot/poky-virtualenv/lib/python2.7/lib-old',
 '/home/elliot/poky-virtualenv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/elliot/poky-virtualenv/local/lib/python2.7/site-packages',
 '/home/elliot/poky-virtualenv/lib/python2.7/site-packages']
Server time:	Fri, 8 Apr 2016 10:34:40 +0100

If I try the above after building (or starting to build) the image, it does appear to work correctly.

We should at least disable the download buttons/links until we know the image recipe file can be downloaded.
Comment 1 Belen Barros Pena 2016-04-25 14:51:06 UTC
Patches submitted to the mailing list

https://lists.yoctoproject.org/pipermail/toaster/2016-April/004495.html

Moving to 2.2 since they missed 2.1
Comment 2 Ross Burton 2016-05-19 16:18:04 UTC
Merged in f08651a954358e9c6ce4d69de285e4cd9e1408ae.
Comment 3 Libertad 2016-07-19 22:29:39 UTC
Created attachment 3295 [details]
Error in "Download recipe file" button
Comment 4 Libertad 2016-07-19 22:34:43 UTC
Tested in master branch commit 627d01997fcf6a0581d88047735769ffb2592b82

To reproduce:

1. Start Toaster.
2. Create a project.
3. Create a custom image for the project based on core-image-minimal.
4. Try to download the custom image (project > configuration > custom images > click download icon next to custom image file name).

If I follow exactly the steps above I dont get the download icon next to custom image file name. I then click on the custom image created in step 3 and it redirects to the  view of "toaster-custom-images) where it allows me to build or download recipe file. The "Download recipe file" looks gray and disabled but it still clicks and redirects to an error attached in attachment 3295 [details].


To be able to download the custom-image-recipe.bb file before build is done building the following steps are taken:

1. Start Toaster.
2. Create a project.
3. Create a custom image for the project based on core-image-minimal.
4. Start Build of the custom image in step 3
5. Try to download the custom image (project > configuration > custom images > click download icon next to custom image file name).

The bb download icon appeared on the table and when clicking on it, the download started. which of the two scenarios should I take into consideration to verify or reopen this issue?
Comment 5 Belen Barros Pena 2016-07-20 08:55:42 UTC
From the Bootstrap 3 documentation (http://getbootstrap.com/css/#buttons):

"Link functionality caveat 

This class [.disabled] uses pointer-events: none to try to disable the link functionality of <a>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support pointer-events: none, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links."

We are currently using the disabled attribute for that link: we would need to replace it with the .disabled class and add custom js as advised.
Comment 6 Michael Wood 2016-08-16 09:50:25 UTC
For clarity I've opened a new bug to track the front end button state issue (which is unrelated to this original bug) bug #10151