Browse Source

modernize: Use d.get* instead of the bb.data.get* facade

In modern Poky the facade is gone and the data dictionary needs
to be accessed directly. This commit is catching up with it. It
was build tested on dora as well. I have not checked if it is
changing the checksums of a dora build.
hfreyther/master-poky
Holger Hans Peter Freyther 4 years ago
parent
commit
6751f3e212
  1. 10
      classes/sysmocom-archiver.bbclass
  2. 2
      recipes-bsp/base-files/base-files_sysmocom.inc
  3. 2
      recipes-bsp/init-ifupdown/init-ifupdown_sysmocom-master.inc
  4. 2
      recipes-bsp/init-ifupdown/init-ifupdown_sysmocom.inc
  5. 2
      recipes-bsp/netbase/netbase_sysmocom.inc
  6. 2
      recipes-bsp/watchdog/watchdog_sysmocom.inc
  7. 2
      recipes-core/busybox/busybox_sysmocom.inc
  8. 2
      recipes-core/busybox/busybox_sysmocom_systemd.inc
  9. 2
      recipes-core/initrdscripts/initramfs-framework_sysmocom.inc
  10. 2
      recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc
  11. 2
      recipes-fixes/cronie/cronie_sysmocom.inc
  12. 2
      recipes-fixes/dropbear/dropbear_sysmocom.inc
  13. 2
      recipes-fixes/initscripts/initscripts_dora.inc
  14. 2
      recipes-fixes/initscripts/initscripts_master.inc
  15. 2
      recipes-fixes/iproute2/iproute2_sysmocom.inc
  16. 2
      recipes-fixes/opkg/opkg_sysmocom.inc
  17. 2
      recipes-fixes/pkgconfig/pkgconfig_sysmocom.inc
  18. 2
      recipes-fixes/systemd/systemd-compat-units_sysmocom.inc
  19. 2
      recipes-fixes/systemd/systemd_sysmocom.inc
  20. 2
      recipes-fixes/udev/udev_sysmocom.inc

10
classes/sysmocom-archiver.bbclass

@ -133,7 +133,7 @@ def not_tarball(d):
workdir = d.getVar('WORKDIR',True)
s = d.getVar('S',True)
if 'work-shared' in s or 'task-' in workdir or 'native' in workdir:
pn = bb.data.getVar('PN', d , True)
pn = d.getVar('PN', True)
if pn == 'gcc-cross':
return False
return True
@ -362,8 +362,8 @@ def archive_scripts_logs(d):
def dumpdata(d):
'''dump environment to "${P}-${PR}.showdata.dump" including all kinds of variables and functions when running a task'''
workdir = bb.data.getVar('WORKDIR', d, 1)
distro = bb.data.getVar('DISTRO', d, 1)
workdir = d.getVar('WORKDIR', 1)
distro = d.getVar('DISTRO', 1)
s = d.getVar('S', True)
pf = d.getVar('PF', True)
target_sys = d.getVar('TARGET_SYS', True)
@ -383,8 +383,8 @@ def dumpdata(d):
bb.data.emit_env(f, d, True)
# emit the metadata which isnt valid shell
for e in d.keys():
if bb.data.getVarFlag(e, 'python', d):
f.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1)))
if d.getVarFlag(e, 'python'):
f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, 1)))
f.close()
def create_diff_gz(d):

2
recipes-bsp/base-files/base-files_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
PRINC="3"

2
recipes-bsp/init-ifupdown/init-ifupdown_sysmocom-master.inc

@ -1,2 +1,2 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/init-ifupdown-${PV}:${SYSMOCOM}/init-ifupdown-master:"

2
recipes-bsp/init-ifupdown/init-ifupdown_sysmocom.inc

@ -1,4 +1,4 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/init-ifupdown-${PV}:${SYSMOCOM}/init-ifupdown:"
PRINC = "13"

2
recipes-bsp/netbase/netbase_sysmocom.inc

@ -1,4 +1,4 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/${PN}-${PV}:${SYSMOCOM}/${PN}:"
PRINC = "21"

2
recipes-bsp/watchdog/watchdog_sysmocom.inc

@ -1,4 +1,4 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/${PN}-${PV}:${SYSMOCOM}/${PN}:"
PRINC = "9"

2
recipes-core/busybox/busybox_sysmocom.inc

@ -1,4 +1,4 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/busybox-${SYSMOCOM_ORIG_PV}:${SYSMOCOM}/files:"
PRINC = "30"

2
recipes-core/busybox/busybox_sysmocom_systemd.inc

@ -1,4 +1,4 @@
# Make busybox work nicely with systemd
SYSMOCOM_D := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM_D := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/${PN}-systemd:${SYSMOCOM_D}/${PN}:"
PRINC := "${@int(PRINC) + 3}"

2
recipes-core/initrdscripts/initramfs-framework_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
PRINC="4"

2
recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc

@ -1,4 +1,4 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
SYSMOCOM := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/files:"
PRINC = "2"

2
recipes-fixes/cronie/cronie_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
PRINC="1"

2
recipes-fixes/dropbear/dropbear_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
PRINC="4"

2
recipes-fixes/initscripts/initscripts_dora.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files-dora"], d)}:"
PRINC="4"

2
recipes-fixes/initscripts/initscripts_master.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files-master"], d)}:"
PRINC="4"

2
recipes-fixes/iproute2/iproute2_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files/${PN}-${PV}"], d)}:${@base_set_filespath(["${THISDIR}/files"], d)}:"
PRINC="2"

2
recipes-fixes/opkg/opkg_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}-${PV}"], d)}:"
PRINC = "2"

2
recipes-fixes/pkgconfig/pkgconfig_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}-${PV}"], d)}:"
PRINC="2"

2
recipes-fixes/systemd/systemd-compat-units_sysmocom.inc

@ -3,7 +3,7 @@ PRINC="3"
# We need networking to run as we have no native services yet
SYSTEMD_DISABLED_SYSV_SERVICES_remove = "networking dnsmasq"
S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
S_THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:"
SRC_URI += "file://alignment.service"

2
recipes-fixes/systemd/systemd_sysmocom.inc

@ -1,4 +1,4 @@
S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
S_THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:"
PRINC="25"

2
recipes-fixes/udev/udev_sysmocom.inc

@ -1,4 +1,4 @@
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}-${PV}"], d)}:"
PRINC="9"

Loading…
Cancel
Save