Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Kevin Hao <kexin.hao@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 1/4] wic: bootimg-pcbios: Drop the unnecessary reference of STAGING_DATADIR
Date: Sat, 29 Sep 2018 15:01:44 +0800	[thread overview]
Message-ID: <20180929070147.88203-2-kexin.hao@windriver.com> (raw)
In-Reply-To: <20180929070147.88203-1-kexin.hao@windriver.com>

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 <kexin.hao@windriver.com>
---
 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



  reply	other threads:[~2018-09-29  7:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-29  7:01 [PATCH 0/4] Fix the build failure when creating a multilib wic Kevin Hao
2018-09-29  7:01 ` Kevin Hao [this message]
2018-09-29  7:01 ` [PATCH 2/4] wic: isoimage-isohybrid: Drop the unnecessary reference of STAGING_DATADIR Kevin Hao
2018-09-29  7:01 ` [PATCH 3/4] bitbake.conf: Introduce variables used to access the other recipe specific sysroot directory in multilib case Kevin Hao
2018-10-01 14:30   ` Richard Purdie
2018-09-29  7:01 ` [PATCH 4/4] wic: Set the right bootimg_dir when building a multilib image Kevin Hao
2018-09-29  7:37 ` ✗ patchtest: failure for Fix the build failure when creating a multilib wic Patchwork

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=20180929070147.88203-2-kexin.hao@windriver.com \
    --to=kexin.hao@windriver.com \
    --cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox