diff mbox

[1/1] dbus-python: select pyexpat dependency

Message ID CAPyrzo1JdOBrWPbDR3-B5CJXQi0O5nGoK_HQOQv6rWNYAMhJqg@mail.gmail.com
State Superseded
Headers show

Commit Message

Ivan Sergeev Nov. 18, 2013, 10:37 p.m. UTC
For some reason git send-email didn't attach the patch. I've attached it
here.

Thanks,
~vsergeev
Ivan Sergeev


On Mon, Nov 18, 2013 at 2:35 PM, Ivan Sergeev <vsergeev@kumunetworks.com>wrote:

> dbus-python requires xml.parsers.expat, which is provided by the pyexpat
> module. This patch enables the pyexpat module when dbus-python is selected.
>
> Before:
>
> # systemd-analyze
> Traceback (most recent call last):
>   File "/usr/bin/systemd-analyze", line 3, in <module>
>     import dbus, sys
>   File "/usr/lib/python2.7/site-packages/dbus/__init__.py", line 100, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 46, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 46, in <module>
>   File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 42, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 35, in
> <module>
>   File
> "/usr/lib/python2.7/site-packages/dbus/_expat_introspect_parser.py", line
> 26, in <module>
> ImportError: No module named xml.parsers.expat
> # python
> Python 2.7.3 (default, Nov 18 2013, 14:12:39)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import dbus
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/site-packages/dbus/__init__.py", line 100, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 46, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 46, in <module>
>   File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 42, in
> <module>
>   File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 35, in
> <module>
>   File
> "/usr/lib/python2.7/site-packages/dbus/_expat_introspect_parser.py", line
> 26, in <module>
> ImportError: No module named xml.parsers.expat
> >>>
> #
>
> After:
>
> # systemd-analyze
> Startup finished in 2252ms (kernel) + 973ms (userspace) = 3225ms
> # python
> Python 2.7.3 (default, Nov 18 2013, 13:07:32)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import dbus
> >>>
> #
>
> NOTE: I had to delete output/build/python-2.7.3/ for the enabled pyexpat
> to take effect during a rebuild (simple "make") of buildroot. I presume
> this is because it's configured and built with python-2.7.3, but perhaps
> this should be handled automatically  -- marking python-2.7.3 "dirty"
> somehow?
>
> Thanks,
> ~vsergeev
> Ivan Sergeev
>
>

Comments

Thomas Petazzoni Nov. 18, 2013, 11:32 p.m. UTC | #1
Dear Ivan Sergeev,

On Mon, 18 Nov 2013 14:37:59 -0800, Ivan Sergeev wrote:

> For some reason git send-email didn't attach the patch. I've attached it
> here.

git send-email never "attaches" the patch. It sends the patch inline,
so that reviewers can hit "reply" and review your patch directly by
replying to the e-mail.

I think your patch is good, but you should add a comment above the new
select line to indicate that it is a runtime dependency only (which
explains why you're changing the Config.in only, and not the .mk file).
Something like:

	# Runtime dependency only
	select BR2_PACKAGE...

Thanks!

Thomas
Ivan Sergeev Nov. 19, 2013, 1:55 a.m. UTC | #2
I think it had to do with adding --compose to git send-email. I had
specified the path of the patch as well, but now I see it wanted to split
it up into separate emails -- one with my composed message explaining the
patch[set] and one for each of the attached patches. Makes sense now.

I see -- I will add the runtime dependency comment and resubmit here.

Thanks,
~vsergeev
Ivan Sergeev


On Mon, Nov 18, 2013 at 3:32 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Ivan Sergeev,
>
> On Mon, 18 Nov 2013 14:37:59 -0800, Ivan Sergeev wrote:
>
> > For some reason git send-email didn't attach the patch. I've attached it
> > here.
>
> git send-email never "attaches" the patch. It sends the patch inline,
> so that reviewers can hit "reply" and review your patch directly by
> replying to the e-mail.
>
> I think your patch is good, but you should add a comment above the new
> select line to indicate that it is a runtime dependency only (which
> explains why you're changing the Config.in only, and not the .mk file).
> Something like:
>
>         # Runtime dependency only
>         select BR2_PACKAGE...
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
diff mbox

Patch

From 9596ae9ae549bfc8df2fe813e62af51b5c33893a Mon Sep 17 00:00:00 2001
From: Ivan Sergeev <vsergeev@kumunetworks.com>
Date: Mon, 18 Nov 2013 13:45:09 -0800
Subject: [PATCH 1/1] dbus-python: select pyexpat dependency

dbus-python requires xml.parsers.expat, which is provided by the pyexpat
module. This patch enables the pyexpat module as a dependency, when dbus-python
is selected.

Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com>
---
 package/dbus-python/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/dbus-python/Config.in b/package/dbus-python/Config.in
index f7b6d94..8d1798d 100644
--- a/package/dbus-python/Config.in
+++ b/package/dbus-python/Config.in
@@ -5,6 +5,7 @@  config BR2_PACKAGE_DBUS_PYTHON
 	depends on BR2_PACKAGE_DBUS
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_PYTHON_PYEXPAT
 	help
 	  Python bindings for D-Bus
 
-- 
1.8.4.2