summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs-postcommands.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-17 11:15:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 16:35:37 +0000
commitfc951851a0e172641e2f24a4edce87ca2eb5cecd (patch)
treeae3aa6564e7275ac66f4793d41c5a29b98e071c4 /meta/classes/rootfs-postcommands.bbclass
parenta8c377beadb85b0ff503ec8ddd1a2cd05e363c19 (diff)
downloadopenembedded-core-contrib-fc951851a0e172641e2f24a4edce87ca2eb5cecd.tar.gz
rootfs-postcommands: Ensure license manifests respect RM_OLD_IMAGE
When RM_OLD_IMAGE is set, old manifest files should be removed along with old image files and our QA tests expect this. This patch ensures this happens. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 96d3051429c..970e9f34b14 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -219,6 +219,9 @@ python write_image_manifest () {
if manifest_name is not None and 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 \
+ os.path.exists(os.path.realpath(manifest_link)):
+ os.remove(os.path.realpath(manifest_link))
os.remove(manifest_link)
os.symlink(os.path.basename(manifest_name), manifest_link)
}