Skip to contentSkip to conversation

image.py: Allow IMAGE_LINK_NAME to be empty

PATCH New Mike Looijmans 1 participant 1 message Sep 11, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image.py: Allow IMAGE_LINK_NAME to be empty

From: Mike Looijmans <[email protected]>

When IMAGE_LINK_NAME is empty, OE will try to create a "blank" link instead of just skipping it. The code checks for "link_name is not None" which will never evaluate to true. Change the test to a simple "if link_name:" so it no longer attempt to create links when the variable is an empty string.

---
 meta/lib/oe/image.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/image.py +1 -1
index 5b77306..2361955 100644
@@ -194,7 +194,7 @@ class Image(ImageDepGraph):
 
         os.chdir(deploy_dir)
 
-        if link_name is not None:
+        if link_name:
             for type in subimages:
                 if os.path.exists(img_name + ".rootfs." + type):
                     dst = link_name + "." + type
Signature · 1 line
2.1.0