Skip to contentSkip to conversation

dbus-python: select pyexpat dependency

PATCH New Ivan Sergeev 3 participants 7 messages Nov 18, 2013 – Nov 30, 2013

lore
Share & tools
lore
#0 lore raw

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 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.
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 1 line
Quoted 1 line
Quoted 1 line

#

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.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

#1 lore raw

PATCH 1/1 dbus-python: select pyexpat dependency

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

Thanks,
~vsergeev
Ivan Sergeev

Quoted 63 lines · Ivan Sergeev

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.
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 1 line
Quoted 1 line
Quoted 1 line

#

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.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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?

Quoted 5 lines

Thanks,
~vsergeev
Ivan Sergeev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131118/3e459efa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dbus-python-select-pyexpat-dependency.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131118/3e459efa/attachment.bin>

#2 lore raw

PATCH 1/1 dbus-python: select pyexpat dependency

Dear Ivan Sergeev,

Quoted 2 lines · Ivan Sergeev

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 dbus-python: select pyexpat dependency

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

Quoted 19 lines · Thomas Petazzoni

Dear Ivan Sergeev,

Quoted 2 lines · Ivan Sergeev

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...

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131118/4fdcc091/attachment.html>

#4 lore raw

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.

---
 package/dbus-python/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/dbus-python/Config.in +2 -0
index f7b6d94..88a6128 100644
@@ -5,6 +5,8 @@ config BR2_PACKAGE_DBUS_PYTHON
 	depends on BR2_PACKAGE_DBUS
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_DBUS_GLIB
+    # pyexpat: runtime dependency only
+	select BR2_PACKAGE_PYTHON_PYEXPAT
 	help
 	  Python bindings for D-Bus
 
Signature · 1 line
1.8.4.2
#5 lore raw

PATCH 1/1 dbus-python: select pyexpat dependency

Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ivan" == Ivan Sergeev <[email protected]> writes:

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.

---
 package/dbus-python/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/dbus-python/Config.in +0 -0
index f7b6d94..88a6128 100644

package/dbus-python/Config.in config BR2_PACKAGE_DBUS_PYTHON · line 9

Quoted 5 lines
package/dbus-python/Config.in +2 -0
@@ -5,6 +5,8 @@ config BR2_PACKAGE_DBUS_PYTHON
 	depends on BR2_PACKAGE_DBUS
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_DBUS_GLIB
+    # pyexpat: runtime dependency only
+	select BR2_PACKAGE_PYTHON_PYEXPAT

Committed with the indentation (tabs vs spaces) fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/1 dbus-python: select pyexpat dependency

In reply to Ivan Sergeev

Dear Ivan Sergeev,

Quoted 1 line · Ivan Sergeev

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

This looks good, but I don't see the patch in your e-mail :)

Quoted 1 line

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?

No, Buildroot doesn't try to be smart about detecting what needs to be rebuilt after a configuration change or a .mk/Config.in change. See
http://buildroot.org/downloads/manual/manual.html#full-rebuild. It's up to the user to know what to rebuild, or to trigger a full rebuild when in doubt.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com