Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: jur on September 01, 2010, 03:38:02 AM

Title: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 03:38:02 AM
I previously in tcl 2.x was able to get bluetooth up and running...now it seems broken.

To start with, after loading bluezI  can't do 'simple-agent' it says the file is not there even though I see it in the directory.

blueman does not run, complaining about missing modules eg pygtk. I see those in the deps list in Appbrowser but they do not get loaded. If I load it manually, it gets further but still spits the dummy. All these worked fine some months ago.

In short I got nowhere - too many problems.

Has this been tested before submitting to the repo?
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 01, 2010, 03:50:08 AM
I use the bluez and blueman extensions regularly with tc-3.x and they work fine for me.

However, I have not updated any of the py* extensions in my /tce folder since the gradual update to python-2.7 started, perhaps this might be the cause of the problem?

I'll look into this more in the next couple of days.
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 01, 2010, 04:26:45 AM
I gave things a go - see attached screenshot with tc-3.1 paired to a bluetooth device.

Steps to reproduce:

1. loaded blueman locally using appbrowser
2. used desktop right-click menu to bring up "services" applet and started bluetooth daemon (which will automatically start dbus daemon)
3. used blueman "search" button, selected device and then "pair" button

As regards simple-agent, (which is not required for the above) note that the python extension used to create a symlink /usr/bin/python -> /usr/local/bin/python - the version of the extension I have locally does not create the symlink.

I missed out correcting the shebang in simple-agent to read "/usr/local/bin/python", hence the error message you get. I will correct this the next time I update the bluez extension, but in the meantime you could create the symlink if your version of the python extension does not create it.

If things still do not work with your setup, maybe you could post the errors and I'll try to help.
Title: Re: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 03:59:57 PM
OK, I still got the same errors.

Code: [Select]

tc@box:~$ blueman-manager
Traceback (most recent call last):
  File "/usr/local/bin/blueman-manager", line 25, in <module>
    import gtk
ImportError: No module named gtk
tc@box:~$

I followed your steps. The first thing I got while loading blueman was a missing lib, lixft.tcz. That's OK sometimes these sort of things happen so I did that one manually. Blueman then installed OK. (I can't explain why it didn't complain about libxft last night - that baffles me. I had to download it so it wasn't even on my pc.)

Using the Services applet, OK.

Right-clicking for bluemanManager in the menu, no response. I repeated in a terminal and got the above gtk problem. Loaded pygtk manually, then:

Code: [Select]


tc@box:~$ loadapp pygtk
pycairo.tcz: OK
pygobject.tcz: OK
pygtk.tcz: OK
tc@box:~$ blueman-manager
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
Loading configuration plugins
_________
<module> (/usr/local/lib/python2.6/site-packages/blueman/main/Config.py:20)
Skipping plugin Gconf
No module named gconf
Using file config backend
_________
on_bluez_name_owner_changed (/usr/local/bin/blueman-manager:104)
org.bluez owner changed to  :1.0
Using file config backend
ERROR:dbus.proxies:Introspect error on org.blueman.Applet:/: dbus.exceptions.DBu.ception: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/local/bin/blueman-applet exited with status 1
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/local/bin/blueman-manager", line 132, in on_bluez_name_owner_changed
    if not self.Applet.GetBluetoothStatus():
  File "/usr/local/lib/python2.6/site-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/local/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/local/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBu.ception: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/local/bin/blueman-applet exited with status 1
Title: Re: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 05:14:33 PM
I have a script that runs after every boot that checks for updates, and automatically downloads if any are available.

I also just did a .dep update. That didn't make a difference.

I checked, on loading blueman, pygtk-2.7 is loaded but it still complains about it. So it seems like a dep problem to start with. Or perhaps bluemans needs to be comiled against py2.7? I wouldn't know, my knowledge is too limited and I haven't followed the python upgrade issue.
Title: Re: bluez & blueman seem out of order
Post by: Arslan S. on September 01, 2010, 06:26:43 PM
i think you have both python and python-2.7 installed
in this case if python-2.7 is installed after python, python2.7 overwrites the python executable from python 2.6
Code: [Select]
sudo ln -sf /usr/local/bin/python2.6 /usr/local/bin/python
Title: Re: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 08:17:26 PM
I am not sure at all what to do... I do indeed have python and python2.7 in /optional, just not sure how to proceed. Do I need to rename anything?
Title: Re: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 08:21:03 PM
i think you have both python and python-2.7 installed
in this case if python-2.7 is installed after python, python2.7 overwrites the python executable from python 2.6
Code: [Select]
sudo ln -sf /usr/local/bin/python2.6 /usr/local/bin/python

Code: [Select]

tc@box:~$ loadapp blueman
tcl_tk.tcz: OK
python-2.7.tcz: OK
pycairo-2.7.tcz: OK
libffi.tcz: OK
pygobject-2.7.tcz: OK
pygtk-2.7.tcz: OK
notify-python.tcz: OK
python.tcz: OK
dbus-python.tcz: OK
bluetooth-2.6.33.3-tinycore.tcz: OK
libusb.tcz: OK
bluez.tcz: OK
blueman.tcz: OK
tc@box:~$

Looks like python got loaded after python-2.7.
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 01, 2010, 08:24:43 PM
I think you'll need pycairo.tcz instead of pycairo-2.7.tcz, pygobject.tcz instead of pygobject-2.7.tcz, etc

This would be because blueman is working with files in "/usr/local/lib/python2.6/site-packages", rather than "/usr/local/lib/python2.7/site-packages"
Title: Re: bluez & blueman seem out of order
Post by: jur on September 01, 2010, 09:55:14 PM
So that boils down to the dep files, as that list I posted is what tce-load -i blueman results in.
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 01, 2010, 10:12:40 PM
The culprit looks to be notify-python.tcz.dep, which reads:
Code: [Select]
libnotify.tcz
pygtk-2.7.tcz

As I had understood the python-2.7 migration plan, if an extension was going to use python-2.7 it should be named notify-python-2.7.tcz - but maybe I'm mistaken...

Maybe you could modify notify-python.tcz.dep to call pygtk.tcz in your local copy and see if this fixes things.

Edit: I just realised that the suggestion above would require using notify-python from the tc-2.x repo...

@Jason - I believe it would make sense to rename notify-python.tcz -> notify-python-2.7.tcz in the 3.x repo and copy notify-python.tcz from the 2.x repo to the 3.x repo, but I'll wait for your comfirmation
Title: Re: bluez & blueman seem out of order
Post by: Arslan S. on September 02, 2010, 01:34:44 AM
if you have a build script you can build blueman with python 2.7 too ;D

also i believe currently extensions dependent on notify-python 2.7 is a lot more than notify-python 2.6, maybe only blueman ? if so there is no need to rename notify-python to notify-python-2.7 instead you can copy tc 2.x notify-python to tc 3.x with the name notify-python-2.6
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 02, 2010, 02:17:10 AM
In fact I have the following extensions in the queue to be re-built against python-2.7:
Code: [Select]
avahi.tcz
blueman.tcz
hplip.tcz
libgsf-gnome.tcz
libproxy.tcz
pil.tcz
pyserial.tcz
python_coherence.tcz
python_setuptools.tcz

..but the point is that I'd understood we were going to label all extensions built against python-2.7 with "-2.7" until all were done and then change everything from python-2.6 to python-2.7 at the same time, i.e. at that point:

1. Rename all python-2.6 extensions from "" -> "-2.6" -i.e. pygtk -> pygtk-2.6
2. Rename all python-2.7 extensions from "-2.7" to "" -i.e. pygtk-2.7 -> pygtk
Title: Re: bluez & blueman seem out of order
Post by: Arslan S. on September 02, 2010, 02:44:07 AM
hmm i didn't know this. i have already updated my existing python extensions without python version or renamed later removing python version during update process gnome 2.28.x to 2.30.x
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 03, 2010, 05:31:58 AM
I renamed notify-python -> notify-python-2.7 and restored the python-2.6 version of notify-python.

@Arslan S: If you let me know which of your updated extensions need renaming "-2.7", I'll try to fix things.

@jur: a fresh download of blueman should now work.
Title: Re: bluez & blueman seem out of order
Post by: jur on September 03, 2010, 06:48:51 AM
Confirmed, now I have it going.
Title: Re: bluez & blueman seem out of order
Post by: Jason W on September 03, 2010, 07:29:52 AM
Juanito -  Sorry I missed your question, I have obviously been distracted from lately from the task at hand. 

Yeah, my preference is for python-2.7 dependent stuff to keep the -2.7 suffix even after the migration, since it will be shortly after that there will be a desire to migrate to yet the next python.  With the suffix remaining in place, we will always know which python an app is built against, and the transition between pythons would remain seamless. 

I did see Arslan's 2.7 dependent stuff being renamed back to not having the -2.7 suffix, but I assumed that each of those apps were confirmed not to have anything built against python 2.6 dependent on them.  Since if they had no 2.6 dependent apps depending on them, then not having the 2.7 suffix would be ok.

Since there has been an issue I think we need to stay with using the 2.7 suffix. 
Title: Re: bluez & blueman seem out of order
Post by: Arslan S. on September 03, 2010, 11:04:37 AM
@Arslan S: If you let me know which of your updated extensions need renaming "-2.7", I'll try to fix things.

i searched my extensions and i have only emesene that optionally depends on notify-python-2.7
Title: Re: bluez & blueman seem out of order
Post by: Juanito on September 03, 2010, 11:21:20 AM
i searched my extensions and i have only emesene that optionally depends on notify-python-2.7

..and I guess dbus-python-2.7, but since they're optional, I believe we can leave things as they are.
Title: Re: bluez & blueman seem out of order
Post by: jur on October 22, 2010, 10:10:56 PM
I'm having the same problem again with blueman:

Code: [Select]

tc@box:~$ bluemanj
tcl.tcz: OK
tk.tcz: OK
python.tcz: OK
pycairo.tcz: OK
libffi.tcz: OK
pygobject.tcz: OK
pygtk.tcz: OK
notify-python.tcz: OK
dbus-python.tcz: OK
blueman.tcz: OK
libiconv.tcz: OK
fuse.tcz: OK
obex.tcz: OK
Traceback (most recent call last):
  File "/usr/local/bin/blueman-manager", line 25, in <module>
    import gtk
ImportError: No module named gtk
sudo: rox: command not found
tc@box:~$ blueman-manager
Traceback (most recent call last):
  File "/usr/local/bin/blueman-manager", line 25, in <module>
    import gtk
ImportError: No module named gtk
Title: Re: bluez & blueman seem out of order
Post by: Juanito on October 22, 2010, 10:41:46 PM
If the repo has been adjusted so that python-2.7 -> python, then you'll need to use blueman-2.7
Title: Re: bluez & blueman seem out of order
Post by: jur on October 22, 2010, 11:02:27 PM
I just did a dep update, and it turns out the deps were adjusted so it is asking for python-2.6 which I didn't have. With python-2.6 loaded it works again.