PPA Package fails to install

Bug #295162 reported by David Murphy
6
Affects Status Importance Assigned to Milestone
RescueTime Linux Uploader
New
Undecided
Unassigned

Bug Description

Trying to install rescuetime-linux-uploader on Intrepid from the PPA results in the following failure:

$ sudo apt-get install rescuetime-linux-uploader
Reading package lists... Done
Building dependency tree
Reading state information... Done
rescuetime-linux-uploader is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up rescuetime-linux-uploader (0.90-1) ...
Compiling /usr/lib/python2.4/site-packages/RescueTimeUploader/gnomepanel.py ...
  File "/usr/lib/python2.4/site-packages/RescueTimeUploader/gnomepanel.py", line 85
    finally:
          ^
SyntaxError: invalid syntax

pycentral: pycentral pkginstall: error byte-compiling files (22)
pycentral pkginstall: error byte-compiling files (22)
dpkg: error processing rescuetime-linux-uploader (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 rescuetime-linux-uploader
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Elliot Murphy (statik) wrote :

Thanks for the bug report Dave! I'm sorry that I don't have much time to look into this now. But I've just given you upload rights to the PPA, so at least I'm not standing in the way ;)

Revision history for this message
hackel (hackel) wrote :

I just experienced this same issue, though I "compiled" the package myself from the release 90 source archive. Looks like there are lots of problems. First, your code depends on python 2.5. In debian/control, set:
     XS-Python-Version: >=2.5

Next, in setup.py you are trying to copy files into system directories! WTF?
     shutil.copy('gnome_applet/rescuetime_16.png','/usr/share/icons/hicolor/16x16/rescuetime.png')
This is completely inappropriate. One should never be compiling packages as root! Instead, you need to copy the files to the install directory, so I commented it out in setup.py and added this to debian/rules:

install/rescuetime-linux-uploader::
        cp gnome_applet/rescuetime_16.png $(DEB_DESTDIR)usr/share/icons/hicolor/16x16/rescuetime.png
        cp gnome_applet/rescuetime_22.png $(DEB_DESTDIR)usr/share/icons/hicolor/22x22/rescuetime.png
        cp gnome_applet/rescuetime_32.png $(DEB_DESTDIR)usr/share/icons/hicolor/32x32/rescuetime.png
        cp gnome_applet/rescuetime_48.png $(DEB_DESTDIR)usr/share/icons/hicolor/48x48/rescuetime.png
        cp gnome_applet/rescuetime_48.png $(DEB_DESTDIR)usr/share/pixmaps/rescuetime.png
        cp gnome_applet/rescuetime_tracker.server $(DEB_DESTDIR)usr/lib/bonobo/servers/
        cp gnome_applet/rescuetime_notifier.server $(DEB_DESTDIR)usr/lib/bonobo/servers/

Alternately, you could modify setup.py to copy the files to the dest directory specified by the --root parameter. I wasn't sure how to do this, as I've never made a python package before.

Now, the package builds without errors, but unfortunately after all this effort, I get a 404 when I try to log in! Really frustrating...

Revision history for this message
Elliot Murphy (statik) wrote :

Hi hackel, definitely lots of polish needed. Care to submit a patch?

Revision history for this message
hackel (hackel) wrote :

I'm pretty sure I submitted enough info to make the changes I did, though I would research the right way to do this. I just don't know enough about pycentral or setuptools and how that build process works.

Revision history for this message
Matthias (matthias-opennomad) wrote :

I've created a patch following hackel's instructions. Here it is. I also added some mkdirs to install/rescuetime-linux-uploader, which was failing otherwise.

FWIW, the uploader I built seems to be actually uploading to rescuetime!

Revision history for this message
Elliot Murphy (statik) wrote :

/me hugs Matthias. Thanks for the patch! I'll review and apply this in a little while.

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.