diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-10-12 21:46:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-15 10:01:42 +0100 |
commit | 751cb2c894122807ed62341ae6b5f129a65e399b (patch) | |
tree | 06a336087a9fba0d14c599d89578b85e347b8660 /meta/classes | |
parent | 1a95d4a0701b87ae3674239a01aabe38a0123585 (diff) | |
download | poky-751cb2c894122807ed62341ae6b5f129a65e399b.tar.gz |
Remove RM_OLD_IMAGE, it's no longer useful
Since the move to put image deployment under sstate control in
d54339d4b1a7e884de636f6325ca60409ebd95ff old images are automatically
removed before a new image is deployed (the default behaviour of the
sstate logic).
RM_OLD_IMAGE is therefore no longer required to provide this
behaviour, remove the variable and its users.
(From OE-Core rev: 93631befe8b962bf99524746b49f4ebca336175c)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cve-check.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/image-vm.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 5 | ||||
-rw-r--r-- | meta/classes/qemuboot.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 3 |
5 files changed, 1 insertions, 20 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 8251ca7c97..1425a40554 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -92,8 +92,6 @@ python cve_check_write_rootfs_manifest () { | |||
92 | manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name) | 92 | manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name) |
93 | # If we already have another manifest, update symlinks | 93 | # If we already have another manifest, update symlinks |
94 | if os.path.exists(os.path.realpath(manifest_link)): | 94 | if os.path.exists(os.path.realpath(manifest_link)): |
95 | if d.getVar('RM_OLD_IMAGE', True) == "1": | ||
96 | os.remove(os.path.realpath(manifest_link)) | ||
97 | os.remove(manifest_link) | 95 | os.remove(manifest_link) |
98 | os.symlink(os.path.basename(manifest_name), manifest_link) | 96 | os.symlink(os.path.basename(manifest_name), manifest_link) |
99 | bb.plain("Image CVE report stored in: %s" % manifest_name) | 97 | bb.plain("Image CVE report stored in: %s" % manifest_name) |
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass index 32c6550037..2f35d6b4d1 100644 --- a/meta/classes/image-vm.bbclass +++ b/meta/classes/image-vm.bbclass | |||
@@ -106,10 +106,6 @@ build_boot_dd() { | |||
106 | 106 | ||
107 | cd ${IMGDEPLOYDIR} | 107 | cd ${IMGDEPLOYDIR} |
108 | 108 | ||
109 | if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then | ||
110 | rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect) | ||
111 | fi | ||
112 | |||
113 | ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect | 109 | ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect |
114 | } | 110 | } |
115 | 111 | ||
@@ -147,10 +143,6 @@ run_qemu_img (){ | |||
147 | type="$1" | 143 | type="$1" |
148 | qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type | 144 | qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type |
149 | 145 | ||
150 | if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then | ||
151 | rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type) | ||
152 | fi | ||
153 | |||
154 | ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type | 146 | ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type |
155 | } | 147 | } |
156 | create_vmdk_image () { | 148 | create_vmdk_image () { |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 915500a2f5..6111f6d266 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -117,7 +117,7 @@ python () { | |||
117 | def rootfs_variables(d): | 117 | def rootfs_variables(d): |
118 | from oe.rootfs import variable_depends | 118 | from oe.rootfs import variable_depends |
119 | variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE', | 119 | variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE', |
120 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', | 120 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', |
121 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', | 121 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', |
122 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', | 122 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', |
123 | 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY'] | 123 | 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY'] |
@@ -588,9 +588,6 @@ python create_symlinks() { | |||
588 | if os.path.exists(os.path.join(deploy_dir, src)): | 588 | if os.path.exists(os.path.join(deploy_dir, src)): |
589 | bb.note("Creating symlink: %s -> %s" % (dst, src)) | 589 | bb.note("Creating symlink: %s -> %s" % (dst, src)) |
590 | if os.path.islink(dst): | 590 | if os.path.islink(dst): |
591 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ | ||
592 | os.path.exists(os.path.realpath(dst)): | ||
593 | os.remove(os.path.realpath(dst)) | ||
594 | os.remove(dst) | 591 | os.remove(dst) |
595 | os.symlink(src, dst) | 592 | os.symlink(src, dst) |
596 | else: | 593 | else: |
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index ef9a128796..b5cc93dc93 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
@@ -76,9 +76,6 @@ python write_qemuboot_conf() { | |||
76 | with open(qemuboot, 'w') as f: | 76 | with open(qemuboot, 'w') as f: |
77 | cf.write(f) | 77 | cf.write(f) |
78 | 78 | ||
79 | if d.getVar('RM_OLD_IMAGE', True) == "1" and os.path.exists(qemuboot_link): | ||
80 | os.remove(os.path.realpath(qemuboot_link)) | ||
81 | |||
82 | if os.path.lexists(qemuboot_link): | 79 | if os.path.lexists(qemuboot_link): |
83 | os.remove(qemuboot_link) | 80 | os.remove(qemuboot_link) |
84 | os.symlink(os.path.basename(qemuboot), qemuboot_link) | 81 | os.symlink(os.path.basename(qemuboot), qemuboot_link) |
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index 07e265c5ac..0c7ceea542 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -232,9 +232,6 @@ python write_image_manifest () { | |||
232 | if os.path.exists(manifest_name): | 232 | if os.path.exists(manifest_name): |
233 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | 233 | manifest_link = deploy_dir + "/" + link_name + ".manifest" |
234 | if os.path.lexists(manifest_link): | 234 | if os.path.lexists(manifest_link): |
235 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ | ||
236 | os.path.exists(os.path.realpath(manifest_link)): | ||
237 | os.remove(os.path.realpath(manifest_link)) | ||
238 | os.remove(manifest_link) | 235 | os.remove(manifest_link) |
239 | os.symlink(os.path.basename(manifest_name), manifest_link) | 236 | os.symlink(os.path.basename(manifest_name), manifest_link) |
240 | } | 237 | } |