public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 3/4] image: Remove backward compatibility with IMAGE_TYPE
Date: Thu, 14 Mar 2024 11:41:13 +0200	[thread overview]
Message-ID: <20240314094114.3867735-4-amikan@ilbers.de> (raw)
In-Reply-To: <20240314094114.3867735-1-amikan@ilbers.de>

We've fully migrated from IMAGE_TYPE = "*-img" naming scheme to the
newer IMAGE_FSTYPES = "*" since v0.9. Now we can remove warnings
and backward compatibility with the older variables.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/image.bbclass | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 1e0691be..067987a1 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -12,7 +12,7 @@ SSTATE_MANIFESTS = "${TMPDIR}/sstate-control/${MACHINE}-${DISTRO}-${DISTRO_ARCH}
 SSTATETASKS += "do_copy_boot_files"
 
 IMAGE_INSTALL ?= ""
-IMAGE_FSTYPES ?= "${@ d.getVar("IMAGE_TYPE") if d.getVar("IMAGE_TYPE") else "ext4"}"
+IMAGE_FSTYPES ?= "ext4"
 IMAGE_ROOTFS ?= "${WORKDIR}/rootfs"
 
 KERNEL_IMAGE_PKG ??= "${@ ("linux-image-" + d.getVar("KERNEL_NAME")) if d.getVar("KERNEL_NAME") else ""}"
@@ -36,9 +36,6 @@ PP_ROOTFS = "${PP}/rootfs"
 PP_WORK = "${PP}/work"
 
 python(){
-    if (d.getVar('IMAGE_TYPE')):
-        bb.warn("IMAGE_TYPE is deprecated, please switch to IMAGE_FSTYPES")
-
     # Debian Sid-Ports stores deb and deb-src in separate repos, which fails
     # sometimes on fetching sources if repos are not in sync during packages
     # version update. It makes Isar to fail on cache-deb-src, so disable it.
@@ -121,10 +118,6 @@ def get_base_type(t, d):
 def get_image_basetypes(d):
     def recurse(t):
         bt = get_base_type(t, d)
-        if bt.endswith('-img'):
-            # be backwards-compatible
-            bt = bt[:-len('-img')]
-            bb.warn("IMAGE_TYPE '{0}-img' is deprecated. Please use '{0}' instead.".format(bt))
         deps = (d.getVar('IMAGE_TYPEDEP:' + bt.replace('-', '_').replace('.', '_')) or '').split()
         ret = set([bt])
         for dep in deps:
@@ -159,10 +152,6 @@ python() {
 
     def collect_image_type(t):
         bt = get_base_type(t, d)
-        if bt.endswith('-img'):
-            # be backwards-compatible
-            bt = bt[:-len('-img')]
-            bb.warn("IMAGE_TYPE '{0}-img' is deprecated. Please use '{0}' instead.".format(bt))
 
         if bt not in basetypes:
             basetypes[bt] = []
@@ -211,7 +200,7 @@ python() {
         # check if required args are set
         required_args = (localdata.getVar('IMAGE_CMD_REQUIRED_ARGS') or '').split()
         if any([d.getVar(arg) is None for arg in required_args]):
-            bb.fatal("IMAGE_TYPE '%s' requires these arguments: %s" % (image_type, ', '.join(required_args)))
+            bb.fatal("IMAGE_FSTYPE '%s' requires these arguments: %s" % (image_type, ', '.join(required_args)))
 
         # imager install
         for dep in (d.getVar('IMAGER_INSTALL:' + bt_clean) or '').split():
-- 
2.34.1


  parent reply	other threads:[~2024-03-14  9:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  9:41 [PATCH 0/4] Remove deprecated variables and classes Anton Mikanovich
2024-03-14  9:41 ` [PATCH 1/4] rpi: Remove deprecated rpi-sdimg.bbclass Anton Mikanovich
2024-03-14  9:41 ` [PATCH 2/4] image: Remove IMAGE_TRANSIENT_PACKAGES deprecation warning Anton Mikanovich
2024-03-14  9:41 ` Anton Mikanovich [this message]
2024-03-14  9:41 ` [PATCH 4/4] u-boot: Remove BUILD_DEPENDS backward compatibility Anton Mikanovich
2024-03-22  8:17 ` [PATCH 0/4] Remove deprecated variables and classes Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240314094114.3867735-4-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox