[oe-commits] [openembedded-core] 15/20: image.bbclass: additional output in create_symlinks

git at git.openembedded.org git at git.openembedded.org
Sun May 22 07:52:28 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d1984eb1ffb2e7385f669b235ffb698f468e1032
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Wed May 18 19:24:16 2016 +0300

    image.bbclass: additional output in create_symlinks
    
    When a symlink does not get created, it is useful for debugging to log
    what would have been created and why it was skipped.
    
    Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
    Signed-off-by: Ed Bartosh <eduard.bartosh at intel.com>
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/image.bbclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 0e81b4e..9f4c83f 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -523,9 +523,9 @@ python create_symlinks() {
     if not link_name:
         return
     for type in subimages:
-        if os.path.exists(img_name + imgsuffix + type):
-            dst = deploy_dir + "/" + link_name + "." + type
-            src = img_name + imgsuffix + type
+        dst = deploy_dir + "/" + link_name + "." + type
+        src = img_name + imgsuffix + type
+        if os.path.exists(src):
             bb.note("Creating symlink: %s -> %s" % (dst, src))
             if os.path.islink(dst):
                 if d.getVar('RM_OLD_IMAGE', True) == "1" and \
@@ -533,6 +533,8 @@ python create_symlinks() {
                     os.remove(os.path.realpath(dst))
                 os.remove(dst)
             os.symlink(src, dst)
+        else:
+            bb.note("Skipping symlink, source does not exist: %s -> %s" % (dst, src))
 }
 
 MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list