From 3a30c562385cb3d9cd1b3043f6fe677a22024018 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sun, 28 Oct 2012 13:49:59 +0000 Subject: Replace bb.data.* with d.* Used sed expression given here: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-November/012373.html Plus an additional expression for .expand. Full expression is: 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' \ -e 's:bb.data.\(expand([^,]*\), \([^ )]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Some minor correction in systemd.bbclass was needed for some expressions that didn't quite match the regex in the desired way; additionally a few instances were manually changed. Signed-off-by: Paul Eggleton --- meta-gnome/recipes-gnome/abiword/abiword.inc | 2 +- meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb | 16 ++++++++-------- meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb | 4 ++-- meta-gnome/recipes-gnome/gtk+/gtk+3_3.2.3.bb | 8 ++++---- meta-gnome/recipes-gnome/orbit2/orbit2_2.14.17.bb | 2 +- meta-gnome/recipes-support/goffice/goffice_0.8.17.bb | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'meta-gnome') diff --git a/meta-gnome/recipes-gnome/abiword/abiword.inc b/meta-gnome/recipes-gnome/abiword/abiword.inc index b1b0f6701..8fbcd3bb2 100644 --- a/meta-gnome/recipes-gnome/abiword/abiword.inc +++ b/meta-gnome/recipes-gnome/abiword/abiword.inc @@ -17,7 +17,7 @@ CVSURI = "cvs://anoncvs:anoncvs@anoncvs.abisource.com/cvsroot;module=abi" CVSSRC = "${WORKDIR}/abi" #want 2.x from 2.x.y for the installation directory -SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" +SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" FILES_${PN} += " \ ${datadir}/icons/* \ diff --git a/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb b/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb index 60b970bab..c4bf3448d 100644 --- a/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb +++ b/meta-gnome/recipes-gnome/abiword/abiword_2.8.6.bb @@ -21,7 +21,7 @@ SRC_URI[md5sum] = "f883b0a7f26229a9c66fd6a1a94381aa" SRC_URI[sha256sum] = "d99089a63a6cfc1a6a4a026be9278028d47d224088d24b1853acb67e95683a15" #want 2.x from 2.x.y for the installation directory -SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" +SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" PR = "r7" @@ -102,21 +102,21 @@ FILES_${PN}-templates += "${datadir}/${PN}-${SHRT_VER}/templates" PACKAGES_DYNAMIC += "^${PN}-meta.* ^${PN}-plugin-.*" python populate_packages_prepend () { - abiword_libdir = bb.data.expand('${libdir}/abiword-2.8/plugins', d) + abiword_libdir = d.expand('${libdir}/abiword-2.8/plugins') do_split_packages(d, abiword_libdir, '(.*)\.so$', 'abiword-plugin-%s', 'Abiword plugin for %s', extra_depends='') metapkg = "abiword-meta" - bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) - bb.data.setVar('FILES_' + metapkg, "", d) + d.setVar('ALLOW_EMPTY_' + metapkg, "1") + d.setVar('FILES_' + metapkg, "") blacklist = [ 'abiword-plugins-dbg', 'abiword-plugins', 'abiword-plugins-doc', 'abiword-plugins-dev', 'abiword-plugins-locale' ] metapkg_rdepends = [] - packages = bb.data.getVar('PACKAGES', d, 1).split() + packages = d.getVar('PACKAGES', 1).split() for pkg in packages[1:]: if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale") and not pkg.count("abiword-doc"): print "Modifying ", pkg metapkg_rdepends.append(pkg) - bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d) - bb.data.setVar('DESCRIPTION_' + metapkg, 'abiword-plugin meta package', d) + d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) + d.setVar('DESCRIPTION_' + metapkg, 'abiword-plugin meta package') packages.append(metapkg) - bb.data.setVar('PACKAGES', ' '.join(packages), d) + d.setVar('PACKAGES', ' '.join(packages)) } diff --git a/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb b/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb index 46be86fce..531a2d7b1 100644 --- a/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb +++ b/meta-gnome/recipes-gnome/gnome-vfs/gnome-vfs_2.24.4.bb @@ -43,8 +43,8 @@ FILES_${PN}-doc += " ${datadir}/gtk-doc" PACKAGES_DYNAMIC += "^gnome-vfs-plugin-.*" python populate_packages_prepend () { - print bb.data.getVar('FILES_gnome-vfs', d, 1) + print d.getVar('FILES_gnome-vfs', 1) - plugindir = bb.data.expand('${libdir}/gnome-vfs-2.0/modules/', d) + plugindir = d.expand('${libdir}/gnome-vfs-2.0/modules/') do_split_packages(d, plugindir, '^lib(.*)\.so$', 'gnome-vfs-plugin-%s', 'GNOME VFS plugin for %s') } diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3_3.2.3.bb b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.2.3.bb index 32b54ef0c..854ba4168 100644 --- a/meta-gnome/recipes-gnome/gtk+/gtk+3_3.2.3.bb +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.2.3.bb @@ -77,17 +77,17 @@ PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" python populate_packages_prepend () { import os.path - prologue = bb.data.getVar("postinst_prologue", d, 1) + prologue = d.getVar("postinst_prologue", 1) - gtk_libdir = bb.data.expand('${libdir}/gtk-3.0/${LIBV}', d) + gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends'); do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules-3.0 > /etc/gtk-3.0/gtk.immodules') do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') - if (bb.data.getVar('DEBIAN_NAMES', d, 1)): - bb.data.setVar('PKG_${PN}', 'libgtk-3.0', d) + if (d.getVar('DEBIAN_NAMES', 1)): + d.setVar('PKG_${PN}', 'libgtk-3.0') } postinst_prologue() { diff --git a/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.17.bb b/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.17.bb index 169dac5fe..9fe531bff 100644 --- a/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.17.bb +++ b/meta-gnome/recipes-gnome/orbit2/orbit2_2.14.17.bb @@ -3,7 +3,7 @@ SECTION = "x11/gnome/libs" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_NAME = "ORBit2" -SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" +SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" SRC_URI = "${GNOME_MIRROR}/${SRC_NAME}/${SHRT_VER}/${SRC_NAME}-${PV}.tar.bz2 \ file://configure-lossage.patch \ file://pkgconfig-fix.patch" diff --git a/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb b/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb index 4b6473149..c5d54ab1c 100644 --- a/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb +++ b/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb @@ -39,7 +39,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} PACKAGES_DYNAMIC += "^goffice-plugin-.*" python populate_packages_prepend () { - goffice_libdir = bb.data.expand('${libdir}/goffice/${PV}/plugins/', d) + goffice_libdir = d.expand('${libdir}/goffice/${PV}/plugins/') do_split_packages(d, goffice_libdir, '(.*)', 'goffice-plugin-%s', 'Goffice plugin for %s', allow_dirs=True) } -- cgit v1.2.3-54-g00ecf