mirror of
https://git.yoctoproject.org/poky
synced 2026-06-15 17:50:07 +00:00
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -13,14 +13,14 @@ python do_install () {
|
||||
}
|
||||
|
||||
python do_install_config () {
|
||||
indir = os.path.dirname(bb.data.getVar('FILE',d,1))
|
||||
indir = os.path.dirname(d.getVar('FILE',1))
|
||||
infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
|
||||
data = infile.read()
|
||||
infile.close()
|
||||
|
||||
data = bb.data.expand(data, d)
|
||||
|
||||
outdir = os.path.join(bb.data.getVar('D', d, 1), bb.data.getVar('sysconfdir', d, 1), 'apt')
|
||||
outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt')
|
||||
if not os.path.exists(outdir):
|
||||
os.makedirs(outdir)
|
||||
outpath = os.path.join(outdir, 'apt.conf.sample')
|
||||
|
||||
@@ -59,15 +59,15 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
|
||||
${localstatedir} ${sysconfdir} \
|
||||
${libdir}/dpkg"
|
||||
FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
|
||||
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} \
|
||||
FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', 1))} \
|
||||
${docdir}/apt"
|
||||
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}"
|
||||
FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}"
|
||||
FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
|
||||
|
||||
do_install () {
|
||||
set -x
|
||||
${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))}
|
||||
${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}
|
||||
${@get_commands_apt_doc(d, bb, d.getVar('apt-manpages', 1))}
|
||||
${@get_commands_apt_doc(d, bb, d.getVar('apt-utils-manpages', 1))}
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 bin/apt-cdrom ${D}${bindir}/
|
||||
install -m 0755 bin/apt-get ${D}${bindir}/
|
||||
|
||||
@@ -10,6 +10,6 @@ SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 "
|
||||
|
||||
inherit autotools
|
||||
|
||||
export AUTOMAKE = "${@bb.which('automake', bb.data.getVar('PATH', d, 1))}"
|
||||
export AUTOMAKE = "${@bb.which('automake', d.getVar('PATH', 1))}"
|
||||
|
||||
FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*"
|
||||
|
||||
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://Copyright.txt;md5=f372516292ff7c33337bf16a74a5f9a8 \
|
||||
|
||||
INC_PR = "r1"
|
||||
|
||||
CMAKE_MAJOR_VERSION = "${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}"
|
||||
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
|
||||
|
||||
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
|
||||
file://support-oe-qt4-tools-names.patch"
|
||||
|
||||
@@ -13,8 +13,8 @@ SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aac
|
||||
|
||||
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
|
||||
python () {
|
||||
prefix=bb.data.getVar("prefix", d, 1)
|
||||
docdir=bb.data.getVar("docdir", d, 1)
|
||||
prefix=d.getVar("prefix", 1)
|
||||
docdir=d.getVar("docdir", 1)
|
||||
|
||||
if not docdir.startswith(prefix):
|
||||
raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
|
||||
@@ -23,7 +23,7 @@ python () {
|
||||
if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
|
||||
docdir_stripped = docdir_stripped[1:]
|
||||
|
||||
bb.data.setVar("docdir_stripped", docdir_stripped, d)
|
||||
d.setVar("docdir_stripped", docdir_stripped)
|
||||
}
|
||||
|
||||
EXTRA_OECMAKE=" \
|
||||
|
||||
@@ -7,17 +7,17 @@ NATIVEDEPS = ""
|
||||
|
||||
inherit autotools gettext
|
||||
|
||||
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
|
||||
FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/gcc-${PV}"
|
||||
|
||||
def get_gcc_fpu_setting(bb, d):
|
||||
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
|
||||
if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
|
||||
return "--with-float=soft"
|
||||
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'ppc-efd' ]:
|
||||
if d.getVar('TARGET_FPU', 1) in [ 'ppc-efd' ]:
|
||||
return "--enable-e500_double"
|
||||
return ""
|
||||
|
||||
def get_gcc_mips_plt_setting(bb, d):
|
||||
if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
|
||||
if d.getVar('TARGET_ARCH', 1) in [ 'mips', 'mipsel' ] and 'mplt' in d.getVar('DISTRO_FEATURES',1).split() :
|
||||
return "--with-mips-plt"
|
||||
return ""
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ EXTRA_OECONF_INTERMEDIATE ?= ""
|
||||
|
||||
GCCMULTILIB = "--disable-multilib"
|
||||
|
||||
EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
|
||||
EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', 1) != 'no']} \
|
||||
--with-gnu-ld \
|
||||
--enable-shared \
|
||||
--enable-languages=${LANGUAGES} \
|
||||
|
||||
@@ -8,7 +8,7 @@ DEPENDS_virtclass-native = "perl-native-runtime"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}"
|
||||
FIXEDSRCDATE = "${@d.getVar('FILE', 1).split('_')[-1].split('.')[0]}"
|
||||
PV = "0.1+cvs${FIXEDSRCDATE}"
|
||||
PR = "r4"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ DESCRIPTION = "Utility scripts for internationalizing XML"
|
||||
SECTION = "devel"
|
||||
LICENSE = "GPLv2"
|
||||
|
||||
URLV="${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}"
|
||||
URLV="${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
|
||||
SRC_URI = "${GNOME_MIRROR}/intltool/${URLV}/intltool-${PV}.tar.bz2"
|
||||
S = "${WORKDIR}/intltool-${PV}"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ DEPENDS_virtclass-nativesdk = "curl-nativesdk"
|
||||
|
||||
PE = "1"
|
||||
|
||||
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg"
|
||||
FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg"
|
||||
|
||||
# Werror gives all kinds bounds issuses with gcc 4.3.3
|
||||
do_configure_prepend() {
|
||||
|
||||
@@ -285,7 +285,7 @@ FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
|
||||
# packages (actually the non modules packages and not created too)
|
||||
ALLOW_EMPTY_perl-modules = "1"
|
||||
PACKAGES_append = " perl-modules "
|
||||
RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}"
|
||||
RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', 1).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}"
|
||||
|
||||
python populate_packages_prepend () {
|
||||
libdir = bb.data.expand('${libdir}/perl/${PV}', d)
|
||||
|
||||
@@ -7,7 +7,7 @@ DEPENDS_virtclass-native = "glib-2.0-native"
|
||||
RDEPENDS_virtclass-native = ""
|
||||
PR = "r3"
|
||||
|
||||
MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
|
||||
MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
|
||||
|
||||
SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
def get_qemu_target_list(d):
|
||||
import bb
|
||||
archs = bb.data.getVar('QEMU_TARGETS', d, True).split()
|
||||
archs = d.getVar('QEMU_TARGETS', True).split()
|
||||
targets = ""
|
||||
for arch in ['mips64', 'mips64el', 'ppcemb']:
|
||||
if arch in archs:
|
||||
|
||||
@@ -70,7 +70,7 @@ do_configure_prepend () {
|
||||
python __anonymous () {
|
||||
import re
|
||||
|
||||
pn = bb.data.getVar("PN", d, 1)
|
||||
pn = d.getVar("PN", 1)
|
||||
if not pn.endswith('-native') and not pn.endswith('-nativesdk'):
|
||||
raise bb.parse.SkipPackage("unfs-server is intended for native/nativesdk builds only")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user