After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 594551 - commit e2fb90c118b1a2223047f6a1260c0d12db503ac2 breaks applet
commit e2fb90c118b1a2223047f6a1260c0d12db503ac2 breaks applet
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: general
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
: 599352 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-08 20:41 UTC by Alex Hofbauer
Modified: 2009-10-23 10:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debian's patch (946 bytes, patch)
2009-10-17 15:43 UTC, Alex Hofbauer
rejected Details | Review

Description Alex Hofbauer 2009-09-08 20:41:47 UTC
Hoi!

Commit "Dropped verbosity, reversed local checkout check" breaks applet for me resulting in a small vertical line and nothing else being displayed in panel.

Reverting fixes that problem for me.

Please let me know if you need more info.


Greets,
Alex
Comment 1 Patryk Zawadzki 2009-09-08 20:51:49 UTC
At least let us know if you use the installed version (make install) or just run from the source dir.
Comment 2 Alex Hofbauer 2009-09-09 07:14:40 UTC
Ah, yes, forgot that. I'm building and installing a deb-package.
Comment 3 Patryk Zawadzki 2009-09-09 07:19:23 UTC
Could you run it from the command line with "-w" command line switch and paste the error message if any? (You can skip any SQL commands that might come up)
Comment 4 Alex Hofbauer 2009-09-09 08:57:13 UTC
(hamster-applet:8984): Bonobo-WARNING **: Can't find 'Hamster_Applet.xml' to load ui from
Traceback (most recent call last):
  • File "/usr/lib/hamster-applet/hamster-applet", line 119 in <module>
    applet_factory(applet, None)
  • File "/usr/lib/hamster-applet/hamster-applet", line 56 in applet_factory
    hamster_applet = HamsterApplet(applet)
  • File "/usr/lib/pymodules/python2.5/hamster/applet.py", line 230 in __init__
    self._gui = stuff.load_ui_file("applet.ui")
  • File "/usr/lib/pymodules/python2.5/hamster/stuff.py", line 38 in load_ui_file
    ui.add_from_file(os.path.join(runtime.data_dir, name))
glib.GError: Failed to open file '/usr/lib/pymodules/python2.5/data/applet.ui': No such file or directory

--------------------------------
dpkg -L: (cut to relevant paths)

/usr/lib/bonobo/servers/Hamster_Applet.server
/usr/lib/pyshared/python2.5/hamster/keybinder/_keybinder.so
/usr/lib/hamster-applet/hamster-applet
/usr/share/gconf/schemas/hamster-applet.schemas
/usr/share/gnome-control-center/keybindings/99-hamster-applet.xml
/usr/share/pyshared/hamster/hamsterdbus.py
/usr/share/pyshared/hamster/__init__.py
/usr/share/pyshared/hamster/keybinder
/usr/share/pyshared/hamster/keybinder/__init__.py
/usr/share/pyshared/hamster/dispatcher.py
/usr/share/pyshared/hamster/graphics.py
/usr/share/pyshared/hamster/idle.py
/usr/share/pyshared/hamster/about.py
/usr/share/pyshared/hamster/db.py
/usr/share/pyshared/hamster/storage.py
/usr/share/pyshared/hamster/applet.py
/usr/share/pyshared/hamster/eds.py
/usr/share/pyshared/hamster/reports.py
/usr/share/pyshared/hamster/stuff.py
/usr/share/pyshared/hamster/preferences.py
/usr/share/pyshared/hamster/edit_activity.py
/usr/share/pyshared/hamster/charting.py
/usr/share/pyshared/hamster/configuration.py
/usr/share/pyshared/hamster/widgets.py
/usr/share/pyshared/hamster/i18n.py
/usr/share/pyshared/hamster/stats.py
/usr/share/pyshared/hamster/defs.py
/usr/share/pyshared/hamster/KeyBinder.py
/usr/share/python-support/hamster-applet.public
/usr/share/hamster-applet/applet.ui
/usr/share/hamster-applet/preferences.ui
/usr/share/hamster-applet/stats.ui
/usr/share/hamster-applet/edit_activity.ui
/usr/share/hamster-applet/Hamster_Applet.xml
/usr/share/hamster-applet/art/stock_calendar-view-day.png
/usr/share/hamster-applet/art/hamster-applet.png
/usr/share/hamster-applet/art/stock_calendar-view-month.png
/usr/share/hamster-applet/art/stock_calendar-view-week.png
/usr/share/hamster-applet/hamster.db
Comment 5 Patryk Zawadzki 2009-09-09 09:04:25 UTC
I'm confused. Your traceback shows /usr/lib/pymodules/python2.5 while dkg says /usr/share/pyshared. Please double-check your installation.
Comment 6 Alex Hofbauer 2009-09-09 09:14:48 UTC
Sorry, I'm afraid I don't get what you mean.

The package is being built using "dpkg-buildpackage", with no additional steps done by myself. The files are indeed installed into "/usr/share/pyshared" and with the changes done by the commit mentioned above I get exactly that traceback.
Comment 7 Patryk Zawadzki 2009-09-09 09:24:12 UTC
I'm guessing that whatever distro you are running is configuring hamster to use /usr/lib/pymodules/python2.5 and then either patches the installer or forcibly moves the files to /usr/share/hamster-applet/.

This is incorrect and causes the installation detection code to fail (it expects the path it was configured with and finds something completely different and thus assumes you run hamster uninstalled).

Please fix your distro to either not move files to /usr/share or fix the patch to also correct PYTHONDIR in defs.py.
Comment 8 Toms Bauģis 2009-09-09 10:25:36 UTC
Thank you for the input so far Alex!

Could it be that you are building the package using hamster's debian/ folder?
That stuff is totally outdated and building is now in the hands of the distributions themselves. 
I've removed the /debian folder in git head now.
Please let us know if that was what you were doing.

The recommended way of building hamster from sources is autogen -> make -> make install (described in http://projecthamster.wordpress.com/building-and-running/)
Comment 9 Alex Hofbauer 2009-09-09 11:39:05 UTC
I'm indeed using the debian/ folder but the one used by Debian in version 2.26.2-1. I appreciate the removal in HEAD though ;-).

No patches applied or install files moving to other directions, btw.
Comment 10 Toms Bauģis 2009-09-09 11:49:51 UTC
Ah, i'm lost now. Will the debian be fine or do we need to report a bug to them?
Comment 11 Patryk Zawadzki 2009-09-09 12:10:17 UTC
Alex:

Please find the cause of python thinking the code sits in /usr/lib/pymodules/python2.5 while the files are in /usr/share and we can work on a fix from there. Please note I'm not yet convinced the fix should go to hamster and your distro.
Comment 12 Patryk Zawadzki 2009-09-09 12:23:06 UTC
Found a bug in current git (or rather an uncommited change on my part). Sorry for the inconvenience, should be fixed now in master.
Comment 13 Alex Hofbauer 2009-10-17 15:43:18 UTC
Created attachment 145674 [details] [review]
Debian's patch
Comment 14 Alex Hofbauer 2009-10-17 15:47:30 UTC
IMHO the bug has not been fixed for "building" in Debian. See above patch the use for 2.28.

Sorry for the noise, thought it might interest you.
Comment 15 Toms Bauģis 2009-10-17 18:39:04 UTC
Review of attachment 145674 [details] [review]:

the patch removes ability to run applet uninstalled, which is necessary for efficient development
Comment 16 Patryk Zawadzki 2009-10-22 22:30:30 UTC
*** Bug 599352 has been marked as a duplicate of this bug. ***
Comment 17 Frederic Peters 2009-10-23 10:40:15 UTC
Perhaps the check could be inverted, running with defs.DATA_DIR unless ../data/ exists, or a variant?
Comment 18 Patryk Zawadzki 2009-10-23 10:55:06 UTC
Perhaps distros shouldn't move files after installation?

hamster/Makefile.am says that Hamster is installed to PYEXECDIR and so does hamster/defs.py.in

If you absolutely need to move Hamster to another location (despite it shipping an elf binary in _keybinder.so), patch both locations. If you break this consistency then you could as well delete half of the files and complain about the applet not being usable.