From 751cb2c894122807ed62341ae6b5f129a65e399b Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 12 Oct 2016 21:46:41 +0100 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/cve-check.bbclass | 2 -- meta/classes/image-vm.bbclass | 8 -------- meta/classes/image.bbclass | 5 +---- meta/classes/qemuboot.bbclass | 3 --- meta/classes/rootfs-postcommands.bbclass | 3 --- 5 files changed, 1 insertion(+), 20 deletions(-) (limited to 'meta/classes') 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 () { manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name) # If we already have another manifest, update symlinks if os.path.exists(os.path.realpath(manifest_link)): - if d.getVar('RM_OLD_IMAGE', True) == "1": - os.remove(os.path.realpath(manifest_link)) os.remove(manifest_link) os.symlink(os.path.basename(manifest_name), manifest_link) 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() { cd ${IMGDEPLOYDIR} - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then - rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect) - fi - ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect } @@ -147,10 +143,6 @@ run_qemu_img (){ type="$1" qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then - rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type) - fi - ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type } 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 () { def rootfs_variables(d): from oe.rootfs import variable_depends 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', - 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', + 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY'] @@ -588,9 +588,6 @@ python create_symlinks() { if os.path.exists(os.path.join(deploy_dir, src)): bb.note("Creating symlink: %s -> %s" % (dst, src)) if os.path.islink(dst): - if d.getVar('RM_OLD_IMAGE', True) == "1" and \ - os.path.exists(os.path.realpath(dst)): - os.remove(os.path.realpath(dst)) os.remove(dst) os.symlink(src, dst) 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() { with open(qemuboot, 'w') as f: cf.write(f) - if d.getVar('RM_OLD_IMAGE', True) == "1" and os.path.exists(qemuboot_link): - os.remove(os.path.realpath(qemuboot_link)) - if os.path.lexists(qemuboot_link): os.remove(qemuboot_link) 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 () { if os.path.exists(manifest_name): manifest_link = deploy_dir + "/" + link_name + ".manifest" if os.path.lexists(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) } -- cgit v1.2.3-54-g00ecf