Actually the bootimg_dir is the value of STAGING_DATADIR, so we don't
need to check this directory twice times.

Signed-off-by: Kevin Hao <[email protected]>
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index d599112dd759..dc7b76cf22a7 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -45,11 +45,10 @@ class BootimgPcbiosPlugin(SourcePlugin):
     @classmethod
     def _get_bootimg_dir(cls, bootimg_dir, dirname):
         """
-        Check if dirname exists in default bootimg_dir or in STAGING_DIR.
+        Check if dirname exists in default bootimg_dir
         """
-        for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR")):
-            if os.path.exists("%s/%s" % (result, dirname)):
-                return result
+        if os.path.exists("%s/%s" % (bootimg_dir, dirname)):
+            return bootimg_dir
 
         raise WicError("Couldn't find correct bootimg_dir, exiting")
 
-- 
2.14.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to