All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Reyna <david.reyna@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 7/9] toaster/models.py: allow local paths for custom recipe's base
Date: Wed, 5 Sep 2018 22:26:46 -0700	[thread overview]
Message-ID: <c8be3cac8fd74c32adc60d63002af556e87556c9.1536210899.git.David.Reyna@windriver.com> (raw)
In-Reply-To: <cover.1536210899.git.David.Reyna@windriver.com>

From: Awais Belal <awais_belal@mentor.com>

In a case where the layer source is local only and the recipe
is not yet built, we can search for the path with layer's
local_source_dir, and if available that should be used rather
than just skipping the scenario.

[YOCTO #12891]

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 lib/toaster/orm/models.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 3a7dff8..4b77e8f 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1663,6 +1663,9 @@ class CustomImageRecipe(Recipe):
 
         path_schema_two = self.base_recipe.file_path
 
+        path_schema_three = "%s/%s" % (self.base_recipe.layer_version.layer.local_source_dir,
+                                     self.base_recipe.file_path)
+
         if os.path.exists(path_schema_one):
             return path_schema_one
 
@@ -1670,6 +1673,10 @@ class CustomImageRecipe(Recipe):
         if os.path.exists(path_schema_two):
             return path_schema_two
 
+        # Or a local path if all layers are local
+        if os.path.exists(path_schema_three):
+            return path_schema_three
+
         return None
 
     def generate_recipe_file_contents(self):
-- 
1.9.1



  parent reply	other threads:[~2018-09-06  5:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  5:26 [SUMO][PATCH 0/9] toaster: SUMO cummulative patch Aug 28 2018 David Reyna
2018-09-06  5:26 ` [PATCH 1/9] toaster: allow pokydirname to be evaluated when all layers are local David Reyna
2018-09-06  5:26 ` [PATCH 2/9] toaster: use a more flexible way to find bitbake David Reyna
2018-09-06  5:26 ` [PATCH 3/9] bitbake: toaster: allow TOASTER_DIR to be overridden from cmdline David Reyna
2018-09-06  5:26 ` [PATCH 4/9] toaster/widgets.py: avoid divide by zero issues David Reyna
2018-09-06  5:26 ` [PATCH 5/9] toastergui/newproject.html: fix release divs David Reyna
2018-09-06  5:26 ` [PATCH 6/9] toaster/checksettings: allow CUSTOM_XML_ONLY setting through env David Reyna
2018-09-06  5:26 ` David Reyna [this message]
2018-09-06  5:26 ` [PATCH 8/9] toaster/layerdetails.js: don't hide local layer info David Reyna
2018-09-06  5:26 ` [PATCH 9/9] bitbake: toaster: Fix comparison in recipe template David Reyna
2018-09-07 14:35 ` [SUMO][PATCH 0/9] toaster: SUMO cummulative patch Aug 28 2018 akuster808
  -- strict thread matches above, loose matches on Subject: below --
2018-08-26 22:33 [PATCH 0/9] toaster: " David Reyna
2018-08-26 22:33 ` [PATCH 7/9] toaster/models.py: allow local paths for custom recipe's base David Reyna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8be3cac8fd74c32adc60d63002af556e87556c9.1536210899.git.David.Reyna@windriver.com \
    --to=david.reyna@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.