diff options
| author | Joshua Lock <joshua.g.lock@intel.com> | 2016-03-23 15:37:59 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-28 15:55:49 +0100 |
| commit | 036167693ae495e5613db20b83c1c59aa8fbc163 (patch) | |
| tree | 2da628c1ec75235e91151f43495e111f79b1f99e | |
| parent | abd5b24ff7f94875d69fca664e9d9ff8ac35c0ad (diff) | |
| download | poky-036167693ae495e5613db20b83c1c59aa8fbc163.tar.gz | |
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.
(From OE-Core rev: 54387be24d6a157574496f1b20b21c7fc2a51d3e)
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.bbclass | 5 |
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 () { | |||
| 215 | link_name = d.getVar('IMAGE_LINK_NAME', True) | 215 | link_name = d.getVar('IMAGE_LINK_NAME', True) |
| 216 | manifest_name = d.getVar('IMAGE_MANIFEST', True) | 216 | manifest_name = d.getVar('IMAGE_MANIFEST', True) |
| 217 | 217 | ||
| 218 | if not manifest_name: | ||
| 219 | return | ||
| 220 | |||
| 218 | pkgs = image_list_installed_packages(d) | 221 | pkgs = image_list_installed_packages(d) |
| 219 | with open(manifest_name, 'w+') as image_manifest: | 222 | with open(manifest_name, 'w+') as image_manifest: |
| 220 | image_manifest.write(format_pkg_list(pkgs, "ver")) | 223 | image_manifest.write(format_pkg_list(pkgs, "ver")) |
| 221 | image_manifest.write("\n") | 224 | image_manifest.write("\n") |
| 222 | 225 | ||
| 223 | if manifest_name is not None and os.path.exists(manifest_name): | 226 | if os.path.exists(manifest_name): |
| 224 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | 227 | manifest_link = deploy_dir + "/" + link_name + ".manifest" |
| 225 | if os.path.exists(manifest_link): | 228 | if os.path.exists(manifest_link): |
| 226 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ | 229 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ |
