Gpoweroff does not support being installed with custom prefixes

Bug #497015 reported by Marius Nestor on 2009-12-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gpoweroff
Wishlist
Philip Peitsch

Bug Description

I have Ubuntu 9.10 32-bit and Python 2.6. I've installed the software with (sudo python setup.py install) and everything was fine. But if I try to run it it outputs the following error:

marius@marius-desktop:~/Desktop$ gpoweroff
Traceback (most recent call last):
  File "/usr/local/bin/gpoweroff", line 221, in <module>
    window = NewGpoweroffWindow()
  File "/usr/local/bin/gpoweroff", line 197, in NewGpoweroffWindow
    ui_filename = os.path.join(getdatapath(), 'ui', 'GpoweroffWindow.ui')
  File "/usr/local/lib/python2.6/dist-packages/gpoweroff/gpoweroffconfig.py", line 50, in getdatapath
    raise project_path_not_found
gpoweroff.gpoweroffconfig.project_path_not_found

Any ideas? Thanks!

Philip Peitsch (philip-peitsch) wrote :

Hi Marius,

That looks rather serious :-). Can you please tell me the location of 'AboutGpoweroffDialog.ui'? From a command line you could find it by doing either:
locate AboutGpoweroffDialog.ui
# or
find / -name AboutGpoweroffDialog.ui -print

On my system it lives in /usr/share/gpoweroff/ui . It looks like you have everything stored under /usr/local, which I suspect may be throwing the script. Out of interest, what distro are you running?

Thanks for your feedback on this too by the way :)... it is much appreciated

Changed in gpoweroff:
status: New → In Progress
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → Philip Peitsch (philip-peitsch)
Marius Nestor (marius-nestor) wrote :

/usr/local/share/gpoweroff/ui/AboutGpoweroffDialog.ui

I have Ubuntu 9.10 32-bit and Python 2.6 :)

Hope this helps, 'cause I really want this tool... as GShutdown doesn't work!

Philip Peitsch (philip-peitsch) wrote :

Ahh. I suspect I know the issue. Can you paste the output of:

grep __gpoweroff_data_directory__ /usr/local/lib/python2.6/dist-packages/gpoweroff/gpoweroffconfig.py

It looks like the setup.py does not correctly re-write the actual data dir, and assumes the data dir is in the wrong location.

If you want, there is a deb file available from my ppa at https://launchpad.net/~philip-peitsch/+archive/ppa that I am far more confident works (i.e., I actually use it :) ). I'm planning to put up a team repository for GPoweroff soon so that Ubuntu users can easily stay up-to-date.

Philip Peitsch (philip-peitsch) wrote :

Ok... official builds are now available from https://launchpad.net/~gpoweroff/+archive/stable. Are you able to install that and try again?

Philip Peitsch (philip-peitsch) wrote :

One last query Marius, did you specify a prefix when installing gpoweroff? I've just done an install in a VM and by default it installs to /usr/bin/gpower, rather than /usr/local/bin/gpoweroff as your error shows the location to be. This is what is causing the issue you're experiencing.

Changed in gpoweroff:
importance: High → Wishlist
status: In Progress → Confirmed
Marius Nestor (marius-nestor) wrote :

I've installed the DEB file on my home PC (Ubuntu 9.10 AMD64) and it works very well now!

Thank you and keep up the very good work!

summary: - Does not work after installing
+ Gpoweroff does not support being installed with custom prefixes
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers