]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox/gtk/perl/base-passwd: Ensure data is correctly expanded
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Feb 2016 13:50:47 +0000 (13:50 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Feb 2016 23:33:12 +0000 (23:33 +0000)
Where variables are used in python, we need to ensure they are expanded.
This happens to work at the moment but likely will not happen in future
and isn't good code practise.

Its mostly an issue around key values, since bitbake has already
performed key expansion when these functions are executed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
meta/recipes-core/busybox/busybox.inc
meta/recipes-devtools/perl/perl_5.22.1.bb
meta/recipes-gnome/gtk+/gtk+3.inc
meta/recipes-gnome/gtk+/gtk+_2.24.29.bb

index a7701682985c5837417e19e95d315b135ecb9944..10457b2decca594cf7bf66e15689394d7789c501 100644 (file)
@@ -89,7 +89,7 @@ if [ ! -e $D${sysconfdir}/group ]; then
 """ + group + """EOF
 fi
 """
-    d.setVar('pkg_preinst_${PN}', preinst)
+    d.setVar(d.expand('pkg_preinst_${PN}'), preinst)
 }
 
 addtask do_package after do_populate_sysroot
index e5710f05f46a83c1ba16d92b04db9d0acb97dc3a..f74d1a4565094c777d4504c6c936ca22c5149822 100644 (file)
@@ -346,6 +346,8 @@ python do_package_prepend () {
     dvar = d.getVar('D', True)
     pn = d.getVar('PN', True)
     def set_alternative_vars(links, target):
+        links = d.expand(links)
+        target = d.expand(target)
         f = open('%s%s' % (dvar, links), 'r')
         for alt_link_name in f:
             alt_link_name = alt_link_name.strip()
index 705852c01cc05af69d8916ffe15be683d4b4989b..54594b1dfc7e065aa065e45c337586143d764464 100644 (file)
@@ -349,7 +349,7 @@ python populate_packages_prepend () {
     # modules. Don't attempt to use the result of do_split_packages() as some
     # modules are manually split (eg. perl-module-unicore).
     packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
-    d.setVar("RRECOMMENDS_${PN}-modules", ' '.join(packages))
+    d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
 }
 
 PACKAGES_DYNAMIC += "^perl-module-.*"
index 36f7b0c06c3d78d65d57a0bd1859eb547761a46a..353c521a8984c89f9d372005b96bc45a0f6c9afb 100644 (file)
@@ -106,6 +106,6 @@ python populate_packages_prepend () {
     do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
 
     if (d.getVar('DEBIAN_NAMES', 1)):
-        d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
+        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0')
 }
 
index 675ef6d80b91d9fed930d5ed47052cabd4dd54c1..cf55d2070a28970f4a30753ee6c2ec4031f2ecf4 100644 (file)
@@ -30,5 +30,5 @@ python populate_packages_prepend () {
     do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
 
     if (d.getVar('DEBIAN_NAMES', True)):
-        d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-2.0')
+        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
 }