Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] wic: small fixes to look in all layers and get plugins
@ 2014-06-04  1:28 João Henrique Ferreira de Freitas
  2014-06-04  1:28 ` [PATCH 1/2] wic: default plugin type directory should be added only once João Henrique Ferreira de Freitas
  2014-06-04  1:28 ` [PATCH 2/2] wic: check if BBLAYERS is valid before use João Henrique Ferreira de Freitas
  0 siblings, 2 replies; 3+ messages in thread
From: João Henrique Ferreira de Freitas @ 2014-06-04  1:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: tom.zanussi

Hi,

As pointed by Adrian Calianu <Adrian.Calianu@enea.com>, these two
patches introduces no functional change. But fixes two points: 

Bad identation of 'for' statement and the case when wic is running 
as raw mode, so BBLAYERS is checked before use.

Thanks.

João Henrique Ferreira de Freitas (2):
  wic: default plugin type directory should be added only once
  wic: check if BBLAYERS is valid before use

 scripts/lib/image/engine.py |  7 ++++---
 scripts/lib/mic/plugin.py   | 11 ++++++-----
 2 files changed, 10 insertions(+), 8 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] wic: default plugin type directory should be added only once
  2014-06-04  1:28 [PATCH 0/2] wic: small fixes to look in all layers and get plugins João Henrique Ferreira de Freitas
@ 2014-06-04  1:28 ` João Henrique Ferreira de Freitas
  2014-06-04  1:28 ` [PATCH 2/2] wic: check if BBLAYERS is valid before use João Henrique Ferreira de Freitas
  1 sibling, 0 replies; 3+ messages in thread
From: João Henrique Ferreira de Freitas @ 2014-06-04  1:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: tom.zanussi

Fix 'for' statement identention so plugin type directory will be
added only once in layers_dirs list.

No functional changes.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
 scripts/lib/mic/plugin.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/mic/plugin.py
index bec33d6..dec0e5b 100644
--- a/scripts/lib/mic/plugin.py
+++ b/scripts/lib/mic/plugin.py
@@ -57,8 +57,8 @@ class PluginMgr(object):
             path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype)
             layer_dirs.append(path)
 
-            path = os.path.join(dl, ptype)
-            layer_dirs.append(path)
+        path = os.path.join(dl, ptype)
+        layer_dirs.append(path)
 
         return layer_dirs
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] wic: check if BBLAYERS is valid before use
  2014-06-04  1:28 [PATCH 0/2] wic: small fixes to look in all layers and get plugins João Henrique Ferreira de Freitas
  2014-06-04  1:28 ` [PATCH 1/2] wic: default plugin type directory should be added only once João Henrique Ferreira de Freitas
@ 2014-06-04  1:28 ` João Henrique Ferreira de Freitas
  1 sibling, 0 replies; 3+ messages in thread
From: João Henrique Ferreira de Freitas @ 2014-06-04  1:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: tom.zanussi

If wic is running as raw mode, it's better to check if BBLAYERS
is valid before inspect it.

No functional changes.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
 scripts/lib/image/engine.py | 7 ++++---
 scripts/lib/mic/plugin.py   | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 3bda1bf..1256236 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -96,9 +96,10 @@ def build_canned_image_list(dl):
     layers_path = get_bitbake_var("BBLAYERS")
     canned_wks_layer_dirs = []
 
-    for layer_path in layers_path.split():
-        path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
-        canned_wks_layer_dirs.append(path)
+    if layers_path is not None:
+        for layer_path in layers_path.split():
+            path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR)
+            canned_wks_layer_dirs.append(path)
 
     path = os.path.join(dl, CANNED_IMAGE_DIR)
     canned_wks_layer_dirs.append(path)
diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/mic/plugin.py
index dec0e5b..585fd6d 100644
--- a/scripts/lib/mic/plugin.py
+++ b/scripts/lib/mic/plugin.py
@@ -53,9 +53,10 @@ class PluginMgr(object):
             self.layers_path = get_bitbake_var("BBLAYERS")
         layer_dirs = []
 
-        for layer_path in self.layers_path.split():
-            path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype)
-            layer_dirs.append(path)
+        if self.layers_path is not None:
+            for layer_path in self.layers_path.split():
+                path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype)
+                layer_dirs.append(path)
 
         path = os.path.join(dl, ptype)
         layer_dirs.append(path)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-04  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04  1:28 [PATCH 0/2] wic: small fixes to look in all layers and get plugins João Henrique Ferreira de Freitas
2014-06-04  1:28 ` [PATCH 1/2] wic: default plugin type directory should be added only once João Henrique Ferreira de Freitas
2014-06-04  1:28 ` [PATCH 2/2] wic: check if BBLAYERS is valid before use João Henrique Ferreira de Freitas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox