diff options
author | David Reyna <David.Reyna@windriver.com> | 2015-03-30 07:12:01 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-17 11:53:57 +0100 |
commit | db254cb513b1ad5f67f42321e01a42ec47572243 (patch) | |
tree | 0dd19dcf79a1d023064db4e05c4470c33f90d6f0 /bitbake | |
parent | 77cad30d531c3c68cd4dd1e26481e09f8546e014 (diff) | |
download | poky-db254cb513b1ad5f67f42321e01a42ec47572243.tar.gz |
bitbake: toaster: recipe path broken in recipe detail page
The recipe paths in managed mode are not processed correctly. They need
any prefix tags removed, and then any build path prefix removed only if
present.
[YOCTO #7523]
(Bitbake rev: ee5c569ebe21c065508cd816ae8cb8842baf0b7e)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 8 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/recipes.html | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 4a6ca8f2b1..b9bb896b57 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -557,7 +557,13 @@ class Recipe(models.Model): | |||
557 | 557 | ||
558 | def get_local_path(self): | 558 | def get_local_path(self): |
559 | if settings.MANAGED and self.layer_version.build.project is not None: | 559 | if settings.MANAGED and self.layer_version.build.project is not None: |
560 | return self.file_path[len(self.layer_version.layer.local_path)+1:] | 560 | # strip any tag prefixes ('virtual:native:') |
561 | layer_path=self.layer_version.layer.local_path.split(":")[-1] | ||
562 | recipe_path=self.file_path.split(":")[-1] | ||
563 | if 0 == recipe_path.find(layer_path): | ||
564 | return recipe_path[len(layer_path)+1:] | ||
565 | else: | ||
566 | return recipe_path | ||
561 | 567 | ||
562 | return self.file_path | 568 | return self.file_path |
563 | 569 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/recipes.html b/bitbake/lib/toaster/toastergui/templates/recipes.html index 889e676b45..458d724568 100644 --- a/bitbake/lib/toaster/toastergui/templates/recipes.html +++ b/bitbake/lib/toaster/toastergui/templates/recipes.html | |||
@@ -80,7 +80,7 @@ | |||
80 | {% endwith %} | 80 | {% endwith %} |
81 | </td> | 81 | </td> |
82 | <!-- Recipe file --> | 82 | <!-- Recipe file --> |
83 | <td class="recipe_file">{{recipe.file_path}}</td> | 83 | <td class="recipe_file">{{recipe.get_local_path}}</td> |
84 | <!-- Section --> | 84 | <!-- Section --> |
85 | <td class="recipe_section">{{recipe.section}}</td> | 85 | <td class="recipe_section">{{recipe.section}}</td> |
86 | <!-- License --> | 86 | <!-- License --> |