Hi all,

While reading create-spdx-3.0.bbclass, I noticed
that several Python functions still do an explicit import of a module
that is already listed in BBIMPORTS:

  python do_create_spdx() {
      import oe.spdx30_tasks
      oe.spdx30_tasks.create_spdx(d)
  }

  python do_create_package_spdx() {
      import oe.spdx30_tasks
      oe.spdx30_tasks.create_package_spdx(d)
  }

  python spdx30_build_started_handler () {
      import oe.spdx30_tasks
      d = e.data.createCopy()
      oe.spdx30_tasks.write_bitbake_spdx(d)
  }

However, meta/lib/oe/__init__.py already contains "spdx30_tasks" in
BBIMPORTS:

  BBIMPORTS = ["data", "path", "utils", "types", "package", "packagedata",
               "packagegroup", "sstatesig", "lsb", "cachedpath", "license",
               "qa", "reproducible", "rust", "buildcfg", "go",
               "spdx30_tasks", "spdx_common"]

My understanding is that, with the module in BBIMPORTS, calls must use
the full namespace (oe.spdx30_tasks.func()) so that they are tracked in
the task signature, and that the explicit imports are no longer needed.

Questions:

  1. Are these imports redundant, or is there a reason to keep them
     (e.g. a case where BBIMPORTS is not applied)?
  2. If they are redundant, would a cleanup patch removing them be
     welcome?

Thanks,
Marcio Henriques

-- 
Cumprimentos,

Márcio Henriques
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#247473): 
https://lists.openembedded.org/g/openembedded-core/message/247473
Mute This Topic: https://lists.openembedded.org/mt/121670953/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to