From 563a020870ee0e8212609639c74f19a0f4fc0847 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 29 Jan 2018 17:11:09 +0000 Subject: meta: don't use deprecated functions from utils.bbclass These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. (From OE-Core rev: c97acbd034532895ce57c6717ed1b3ccc7900b0d) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/image.bbclass | 2 +- meta/classes/image_types.bbclass | 2 +- meta/classes/kernel.bbclass | 2 +- meta/classes/libc-package.bbclass | 20 ++++++++++---------- meta/classes/module-base.bbclass | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 4531aa2a57..7abb918212 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -17,7 +17,7 @@ RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}" INHIBIT_DEFAULT_DEPS = "1" -TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}" +TESTIMAGECLASS = "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}" inherit ${TESTIMAGECLASS} # IMAGE_FEATURES may contain any available package group diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index b17c435274..ae3e6edef3 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -228,7 +228,7 @@ IMAGE_CMD_f2fs () { EXTRA_IMAGECMD = "" inherit siteinfo kernel-arch -JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}" +JFFS2_ENDIANNESS ?= "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}" JFFS2_ERASEBLOCK ?= "0x40000" EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers" diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 2f6eca382e..943938df0e 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -547,7 +547,7 @@ RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base" # not wanted in images as standard RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image" PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name('${KERNEL_VERSION}')}" -RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}" +RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}" PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name('${KERNEL_VERSION}')}" RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}" ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1" diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 739adce694..2e7cd25297 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -113,9 +113,9 @@ python package_do_split_gconvs () { bb.error("datadir not defined") return - gconv_libdir = base_path_join(libdir, "gconv") - charmap_dir = base_path_join(datadir, "i18n", "charmaps") - locales_dir = base_path_join(datadir, "i18n", "locales") + gconv_libdir = oe.path.join(libdir, "gconv") + charmap_dir = oe.path.join(datadir, "i18n", "charmaps") + locales_dir = oe.path.join(datadir, "i18n", "locales") binary_locales_dir = d.getVar('localedir') def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): @@ -189,7 +189,7 @@ python package_do_split_gconvs () { # Read in supported locales and associated encodings supported = {} - with open(base_path_join(d.getVar('WORKDIR'), "SUPPORTED")) as f: + with open(oe.path.join(d.getVar('WORKDIR'), "SUPPORTED")) as f: for line in f.readlines(): try: locale, charset = line.rstrip().split() @@ -231,12 +231,12 @@ python package_do_split_gconvs () { commands = {} def output_locale_binary(name, pkgname, locale, encoding): - treedir = base_path_join(d.getVar("WORKDIR"), "locale-tree") - ldlibdir = base_path_join(treedir, d.getVar("base_libdir")) + treedir = oe.path.join(d.getVar("WORKDIR"), "locale-tree") + ldlibdir = oe.path.join(treedir, d.getVar("base_libdir")) path = d.getVar("PATH") - i18npath = base_path_join(treedir, datadir, "i18n") - gconvpath = base_path_join(treedir, "iconvdata") - outputpath = base_path_join(treedir, binary_locales_dir) + i18npath = oe.path.join(treedir, datadir, "i18n") + gconvpath = oe.path.join(treedir, "iconvdata") + outputpath = oe.path.join(treedir, binary_locales_dir) use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or "0" if use_cross_localedef == "1": @@ -344,7 +344,7 @@ python package_do_split_gconvs () { d.appendVar('RDEPENDS_%s' % metapkg, ' ' + pkg) if use_bin == "compile": - makefile = base_path_join(d.getVar("WORKDIR"), "locale-tree", "Makefile") + makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile") m = open(makefile, "w") m.write("all: %s\n\n" % " ".join(commands.keys())) for cmd in commands: diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass index 6fe77c01b7..f851b85163 100644 --- a/meta/classes/module-base.bbclass +++ b/meta/classes/module-base.bbclass @@ -12,7 +12,7 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" # we didn't pick the name. export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" -export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" +export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" KERNEL_OBJECT_SUFFIX = ".ko" # kernel modules are generally machine specific -- cgit v1.2.3-54-g00ecf