]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_manifest
authorMike Crowe <mac@mcrowe.com>
Mon, 15 Jul 2019 12:50:59 +0000 (13:50 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Jul 2019 11:17:18 +0000 (12:17 +0100)
Ensure that we don't create a symlink named ".manifest" if IMAGE_LINK_NAME
is empty.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs-postcommands.bbclass

index 89f8efd323634ed50e186e85156d0ee7a4c4a94b..a2fe3dea2b59cd94615b3f37cc143a455a200186 100644 (file)
@@ -260,7 +260,7 @@ python write_image_manifest () {
     with open(manifest_name, 'w+') as image_manifest:
         image_manifest.write(format_pkg_list(pkgs, "ver"))
 
-    if os.path.exists(manifest_name):
+    if os.path.exists(manifest_name) and link_name:
         manifest_link = deploy_dir + "/" + link_name + ".manifest"
         if os.path.lexists(manifest_link):
             os.remove(manifest_link)