Bug 12006

Summary: Image recipes view: Recipe file link not redirecting correctly
Product: [Build System, Metadata & Runtime] Toaster Reporter: Libertad <libertad.gonzalez.de.la.cruz>
Component: toasterAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: normal    
Priority: Medium CC: david.reyna, jessica.zhang, stanciux.mihail
Version: 2.5   
Target Milestone: 2.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Outcome of the recipe file link none

Description Libertad 2017-08-30 15:36:51 UTC
Created attachment 3967 [details]
Outcome of the recipe file link

DESCRIPTION

When clicking on the button next to the recipe file the page says Page not found (404)

BUILD: 2.4 M3: rc1-5f6945f5031e1a4ca116cc1eccf4c2f9dc228547
ENVIRONMENT: Debian 4.3.0-0.bpo.1-amd64

STEPS TO REPRODUCE: 	
	1. Start Toaster.

	2.  Click on new project button.

	3.  Enter a project name, select a release (ex: master) and click on create project.

	4. Click on Image recipes tab.

	5. Click on edit columns and select recipe file.

	6. Click on the blue button near a recipe file.

	7. Repet steps - 4 to 6 for software recipes.



EXPECTED OUTCOME:  	

Open repo for Recipe file. You can see the repository for recipes. on Image recipes tab and on software recipes tab.

ACTUAL OUTCOME:

Page not found (404)
Request Method:	GET
Request URL:	http://localhost:8000/toastergui/project/2/images/None
Using the URLconf defined in toastermain.urls, Django tried these URL patterns, in this order:
^toastergui/ ^landing/$ [name='landing']
^toastergui/ ^builds/$ [name='all-builds']
^toastergui/ ^build/(?P<build_id>\d+)$ [name='builddashboard']
^toastergui/ ^build/(?P<build_id>\d+)/tasks/$ [name='tasks']
^toastergui/ ^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$ [name='task']
^toastergui/ ^build/(?P<build_id>\d+)/recipes/$ [name='recipes']
^toastergui/ ^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$ [name='recipe']
^toastergui/ ^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$ [name='recipe']
^toastergui/ ^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$ [name='recipe_packages']
^toastergui/ ^build/(?P<build_id>\d+)/packages/$ [name='packages']
^toastergui/ ^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$ [name='package_built_detail']
^toastergui/ ^build/(?P<build_id>\d+)/package_built_dependencies/(?P<package_id>\d+)$ [name='package_built_dependencies']
^toastergui/ ^build/(?P<build_id>\d+)/package_included_detail/(?P<target_id>\d+)/(?P<package_id>\d+)$ [name='package_included_detail']
^toastergui/ ^build/(?P<build_id>\d+)/package_included_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$ [name='package_included_dependencies']
^toastergui/ ^build/(?P<build_id>\d+)/package_included_reverse_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$ [name='package_included_reverse_dependencies']
^toastergui/ ^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$ [name='target']
^toastergui/ ^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$ [name='dirinfo_ajax']
^toastergui/ ^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$ [name='dirinfo']
^toastergui/ ^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$ [name='dirinfo_filepath']
^toastergui/ ^build/(?P<build_id>\d+)/configuration$ [name='configuration']
^toastergui/ ^build/(?P<build_id>\d+)/configvars$ [name='configvars']
Comment 1 David Reyna 2017-09-03 23:22:37 UTC
The root cause is that the pre-defined default layers "openembedded-core", "meta-poky", and "meta-yocto-bsp" do not include the link information in the fixture file "orm/fixtures/poky.xml".
Comment 2 David Reyna 2017-09-04 04:21:15 UTC
I have tested the recipe links in the affected default fixture layers with the patch, for example:

(a) openembedded-core - "build-appliance-image"

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/images/build-appliance-image_15.0.0.bb?h=master

(b) meta-yocto-bsp - "gma500-gfx-check"

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb?h=master

(c) meta-poky - "tiny-init"

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-poky/recipes-core/tiny-init/tiny-init.bb?h=master

All of the other layers have their recipe path syntax in the database and all seem to be working. If there is one failing then the error is in the Layer Index.
Comment 3 David Reyna 2017-09-04 05:41:33 UTC
*** Bug 11956 has been marked as a duplicate of this bug. ***
Comment 4 David Reyna 2017-09-07 04:36:42 UTC
commit 019f68981389c49a78fe78509417409adee7ef03