bzr-gtk install does not honour --home argument

Bug #304364 reported by David I
4
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Triaged
Medium
Unassigned

Bug Description

Running olive on Ubuntu Gutsy Gibbon worked OK (presumably because a version of bzr-gtk was installed by the package manager, but with Hardy Heron (where the bzr packages are not installed)I am getting the following error:

/data/users/david.ingamells/bazaar/bzr-gtk-0.95.0$ olive-gtk
Traceback (most recent call last):
  File "/data/id/release/bzr/current/bin/olive-gtk", line 94, in <module>
    app = OliveGtk()
  File
"/data/id/release/bzr/bzr-1.9/lib/python/bzrlib/plugins/gtk/olive/__init__.py",
line 91, in __init__
    self.window = OliveGui(calling_app = self)
  File
"/data/id/release/bzr/bzr-1.9/lib/python/bzrlib/plugins/gtk/olive/window.py",
line 37, in __init__

self.set_icon_list(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png")),
TypeError: pixbuf_new_from_file() argument 1 must be string, not None

It looks like oliveicon2.png is not being found.

When I look in the bzr-gtk code of __init__.py (as installed) I see:

def data_basedirs():
    return [os.path.dirname(__file__),
             "/usr/share/bzr-gtk",
             "/usr/local/share/bzr-gtk"]

This is wrong as I installed from the source package with:

python setup.py install --home xxxxx

where xxx is not /usr/...

It looks like the install of bzr-gtk is not correctly using the --home argument.

Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

In continuation on this bug:
I have installed latest bzr-gtk (0.99.1) in my home folder (Fedora 12 x86_64, python 2.6.2, bzrlib 2.2.2) with

python setup.py install --home=~

As an effect of non-default install location some of bzr-gtk dialogs are not working (merge, about) - they also can not find the icons.

The solution, as David I pointed, is to change the data_basedirs() function. I do not know how to make it really honour the --home installation option, but I can imagine that installing to home folder as I did is next common case after default install.

Attached is the patch to solve this icon issue when installing to home folder

BTW, about icons - since Olive is separate from the bzr-gtk now, it's icons can be removed from bzr-gtk.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 304364] Re: bzr-gtk install does not honour --home argument

On Fri, 2011-01-07 at 14:41 +0000, Pavlo Shchelokovskyy wrote:
> In continuation on this bug:
> I have installed latest bzr-gtk (0.99.1) in my home folder (Fedora 12 x86_64, python 2.6.2, bzrlib 2.2.2) with
>
> python setup.py install --home=~
>
> As an effect of non-default install location some of bzr-gtk dialogs are
> not working (merge, about) - they also can not find the icons.
>
> The solution, as David I pointed, is to change the data_basedirs()
> function. I do not know how to make it really honour the --home
> installation option, but I can imagine that installing to home folder as
> I did is next common case after default install.
Yeah, I really think we need to fix that function to use the actual path
that was used during installation time, rather than supporting the most
common locations.

> Attached is the patch to solve this icon issue when installing to home
> folder
>
> BTW, about icons - since Olive is separate from the bzr-gtk now, it's
> icons can be removed from bzr-gtk.
That's a good point I'll look into it.

Cheers,

Jelmer

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.