summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-03-23 15:37:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 15:54:50 +0100
commit54387be24d6a157574496f1b20b21c7fc2a51d3e (patch)
tree6ea8a43e013fd65cf6902a941bac71aad694ef24
parent9927a3d72e2272d8e3dc4785ba02e27802ee1c6c (diff)
downloadopenembedded-core-54387be24d6a157574496f1b20b21c7fc2a51d3e.tar.gz
openembedded-core-54387be24d6a157574496f1b20b21c7fc2a51d3e.tar.bz2
openembedded-core-54387be24d6a157574496f1b20b21c7fc2a51d3e.zip
rootfs-postcommands: don't write manifest when IMAGE_MANIFEST empty
Return early in write_image_manifest () if the IMAGE_MANIFEST variable is unset. This allows us to prevent writing of the manifest where we prevent images being created for a recipe by unsetting IMAGE_FSTYPES. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/rootfs-postcommands.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index e184667f67..56e810fd6f 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -215,12 +215,15 @@ python write_image_manifest () {
link_name = d.getVar('IMAGE_LINK_NAME', True)
manifest_name = d.getVar('IMAGE_MANIFEST', True)
+ if not manifest_name:
+ return
+
pkgs = image_list_installed_packages(d)
with open(manifest_name, 'w+') as image_manifest:
image_manifest.write(format_pkg_list(pkgs, "ver"))
image_manifest.write("\n")
- if manifest_name is not None and os.path.exists(manifest_name):
+ if os.path.exists(manifest_name):
manifest_link = deploy_dir + "/" + link_name + ".manifest"
if os.path.exists(manifest_link):
if d.getVar('RM_OLD_IMAGE', True) == "1" and \