gtk+3: don't split immodules if we have none
PATCH 1/1 gtk+3: don't split immodules if we have none
From: Christopher Larson <[email protected]>
Currently we don't enable any immodules for gtk+3, yet we unconditionally call do_split_packages on a nonexistent path. This results in a return value of None, which it then tries to join, resulting in a TypeError. Only split the modules if we have any modules to split.
--- meta/recipes-gnome/gtk+/gtk+3.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-gnome/gtk+/gtk+3.inc +2 -1
@@ -94,7 +94,8 @@ python populate_packages_prepend () { immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends'); - d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) + if os.path.exists(os.path.join(d.getVar('D', True), immodules_root)): + d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') if (d.getVar('DEBIAN_NAMES', 1)):
Signature · 1 line
1.8.3.4
Quoted 18 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Currently we don't enable any immodules for gtk+3, yet we unconditionally call
do_split_packageson a nonexistent path. This results in a return value of None, which it then tries to join, resulting in a TypeError. Only split the modules if we have any modules to split.Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-gnome/gtk+/gtk+3.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-gnome/gtk+/gtk+3.inc +0
-0
meta/recipes-gnome/gtk+/gtk+3.inc python populate_packages_prepend () { · line 101
Quoted 9 lines
meta/recipes-gnome/gtk+/gtk+3.inc +2
-1@@ -94,7 +94,8 @@ python populate_packages_prepend () { immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends'); - d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) + if os.path.exists(os.path.join(d.getVar('D', True), immodules_root)): + d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s'))) do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') if (d.getVar('DEBIAN_NAMES', 1)):
This seems to give me the following QA error:
Quoted 9 lines
ERROR: QA Issue: gtk+3: Files/directories were installed but not shipped
/usr/lib/gtk-3.0/3.0.0/immodules/im-viqr.so/usr/lib/gtk-3.0/3.0.0/immodules/im-am-et.so/usr/lib/gtk-3.0/3.0.0/immodules/im-xim.so/usr/lib/gtk-3.0/3.0.0/immodules/im-multipress.so/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so/usr/lib/gtk-3.0/3.0.0/immodules/im-ti-et.so/usr/lib/gtk-3.0/3.0.0/immodules/im-ipa.so/usr/lib/gtk-3.0/3.0.0/immodules/im-inuktitut.so
Quoted 8 lines
/usr/lib/gtk-3.0/3.0.0/immodules/im-ti-er.so
/usr/lib/gtk-3.0/3.0.0/immodules/im-thai.so
/usr/lib/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.so
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed:do_package_qa
ERROR: Logfile of failure stored in:/srv/hdd/builds/world/tmp/work/x86_64-poky-linux/gtk+3/3.8.2-r0/temp/log.do_package.17386
ERROR: Task 6017 (/srv/hdd/poky/meta/recipes-gnome/gtk+/gtk+3_3.8.2.bb,do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6199 tasks of which 6190 didn't need to be rerun and 1 failed.
Thanks
Sau!
Quoted 37 lines · Saul Wold
Quoted 35 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Currently we don't enable any immodules for gtk+3, yet we unconditionally call
do_split_packageson a nonexistent path. This results in a return value of None, which it then tries to join, resulting in a TypeError. Only split the
modules if we have any modules to split.Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-gnome/gtk+/gtk+3.**inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-gnome/gtk+/gtk+**3.inc +0
-1@@ -94,7 +94,8 @@ python populate_packages_prepend () { immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends'); - d.setVar('GTKIMMODULES_**PACKAGES', ' '.join(do_split_packages(d,
immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')))
+ if os.path.exists(os.path.join(d.**getVar('D', True),immodules_root)):
+ d.setVar('GTKIMMODULES_**PACKAGES', '
'.join(do_split_packages(d,immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')))
do_split_packages(d,printmodules_root,
'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
Quoted 27 lines
Quoted 3 lines
if (d.getVar('DEBIAN_NAMES', 1)):This seems to give me the following QA error:
ERROR: QA Issue: gtk+3: Files/directories were installed but not shipped
Quoted 19 lines
/usr/lib/gtk-3.0/3.0.0/**immodules/im-viqr.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-am-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-xim.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-multipress.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cedilla.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ipa.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-inuktitut.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-er.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-thai.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cyrillic-**translit.so
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed:do_package_qa
ERROR: Logfile of failure stored in:/srv/hdd/builds/world/tmp/**work/x86_64-poky-linux/gtk+3/**3.8.2-r0/temp/log.do_package.**17386
ERROR: Task 6017 (/srv/hdd/poky/meta/recipes-**gnome/gtk+/gtk+3_3.8.2.bb,do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6199 tasks of which 6190 didn't need to be rerun and 1 failed.
Huh, interesting, on this box it doesn't build any modules at all, hence the need for this.. oh, I see what I did wrong, I used os.path.join(), so gtk_libdir squished ${D} down to nothing. I'll send a v2 using the oe.path.join, and also try to determine why it builds modules for you but not me :) I expect we should be passing an explicit autoconf argument to enable all modules, or not.
Signature · 1 line
Christopher Larson
Quoted 66 lines · Chris Larson
Quoted 37 lines · Saul Wold
Quoted 35 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Currently we don't enable any immodules for gtk+3, yet we unconditionally call
do_split_packageson a nonexistent path. This results in a return value of None, which it then tries to join, resulting in a TypeError. Only split the
modules if we have any modules to split.Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-gnome/gtk+/gtk+3.**inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-gnome/gtk+/gtk+**3.inc +0
-1@@ -94,7 +94,8 @@ python populate_packages_prepend () { immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends'); - d.setVar('GTKIMMODULES_**PACKAGES', ' '.join(do_split_packages(d,
immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')))
+ if os.path.exists(os.path.join(d.**getVar('D', True),immodules_root)):
+ d.setVar('GTKIMMODULES_**PACKAGES', '
'.join(do_split_packages(d,immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')))
do_split_packages(d,printmodules_root,
'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')Quoted 27 lines
Quoted 3 lines
if (d.getVar('DEBIAN_NAMES', 1)):This seems to give me the following QA error:
ERROR: QA Issue: gtk+3: Files/directories were installed but not shipped
Quoted 19 lines
/usr/lib/gtk-3.0/3.0.0/**immodules/im-viqr.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-am-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-xim.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-multipress.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cedilla.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ipa.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-inuktitut.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-er.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-thai.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cyrillic-**translit.so
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed:do_package_qa
ERROR: Logfile of failure stored in:/srv/hdd/builds/world/tmp/**work/x86_64-poky-linux/gtk+3/**3.8.2-r0/temp/log.do_package.**17386
ERROR: Task 6017 (/srv/hdd/poky/meta/recipes-**gnome/gtk+/gtk+3_3.8.2.bb,do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6199 tasks of which 6190 didn't need to be rerun and 1 failed.
Quoted 6 lines
Huh, interesting, on this box it doesn't build any modules at all, hence the need for this.. oh, I see what I did wrong, I used
os.path.join(), sogtk_libdirsquished ${D} down to nothing. I'll send a v2 using the oe.path.join, and also try to determine why it builds modules for you but not me :) I expect we should be passing an explicit autoconf argument to enable all modules, or not.
Why not use return value from do_split_packages to decide whether to set GTKIMMODULES_**PACKAGES or not? At least that's what's already used in some places.
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 82 lines · Martin Jansa
Quoted 7 lines · Chris Larson
Quoted 5 lines · Saul Wold
Quoted 3 lines · Christopher Larson
From: Christopher Larson <[email protected]>
Currently we don't enable any immodules for gtk+3, yet we
unconditionally
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
call
do_split_packageson a nonexistent path. This results in a returnvalue of
Quoted 1 line
Quoted 1 line
Quoted 1 line
None, which it then tries to join, resulting in a TypeError. Only
split
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
the
modules if we have any modules to split.Signed-off-by Christopher Larson <[email protected]>--- meta/recipes-gnome/gtk+/gtk+3.**inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-gnome/gtk+/gtk+**3.inc +0
-0@@ -94,7 +94,8 @@ python populate_packages_prepend () { immodules_root = os.path.join(gtk_libdir, 'immodules') printmodules_root = os.path.join(gtk_libdir, 'printbackends');Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta/recipes-gnome/gtk+/gtk+**3.inc +0
-1- d.setVar('GTKIMMODULES_**PACKAGES', ' '.join(do_split_packages(d,
immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK inputmodule for
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
%s')))
+ if os.path.exists(os.path.join(d.**getVar('D', True),immodules_root)):
+ d.setVar('GTKIMMODULES_**PACKAGES', '
'.join(do_split_packages(d,immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')))
do_split_packages(d,printmodules_root,
'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTKprintbackend
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
module for %s')
if (d.getVar('DEBIAN_NAMES', 1)):This seems to give me the following QA error:
ERROR: QA Issue: gtk+3: Files/directories were installed but not
shipped
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
/usr/lib/gtk-3.0/3.0.0/**immodules/im-viqr.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-am-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-xim.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-multipress.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cedilla.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-et.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-ipa.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-inuktitut.soQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
/usr/lib/gtk-3.0/3.0.0/**immodules/im-ti-er.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-thai.so/usr/lib/gtk-3.0/3.0.0/**immodules/im-cyrillic-**translit.so
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed:do_package_qa
ERROR: Logfile of failure stored in:/srv/hdd/builds/world/tmp/**work/x86_64-poky-linux/gtk+3/**3.8.2-r0/temp/log.do_package.**17386
ERROR: Task 6017 (/srv/hdd/poky/meta/recipes-**gnome/gtk+/gtk+3_3.8.2.bb,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6199 tasks of which 6190 didn't needto be
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
rerun and 1 failed.
Huh, interesting, on this box it doesn't build any modules at all, hence the need for this.. oh, I see what I did wrong, I used
os.path.join(), sogtk_libdirsquished ${D} down to nothing. I'll send a v2 using the oe.path.join, and also try to determine why it builds modules for you but not me :) I expect we should be passing an explicit autoconf argument to enable all modules, or not.
Quoted 3 lines
Why not use return value from
do_split_packagesto decide whether to set GTKIMMODULES_**PACKAGES or not? At least that's what's already used in some places.
Sent a new short series of 2 patches to do just that as well as fix the real root cause of the issue I was hitting. Thanks for the review.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics