maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   PyPackager Help (https://talk.maemo.org/showthread.php?t=53364)

EIPI 2010-05-23 00:40

PyPackager Help
 
I am trying to package an application, and am running into some difficulties using PyPackager. It worked for me a few months ago, but I have now updated my Scratchbox to PR1.2.

PyPackager gives the following error:
Code:

Traceback (most recent call last):
  File "make.py", line 48, in <module>
    print p.generate(build_binary=True,build_src=False)
  File "/usr/lib/python2.5/site-packages/pypackager.py", line 140, in generate
    self.generate_binary()
  File "/usr/lib/python2.5/site-packages/pypackager.py", line 170, in generate_binary
    open(self.name+'_'+self.version+'-'+self.buildversion+'_'+self.arch+ '.deb',"wb").write(theMaemoPackage.packed())
  File "/usr/lib/python2.5/site-packages/ppkg_debfile.py", line 144, in packed
    theDeb.files.append(self._getDataFiles())
  File "/usr/lib/python2.5/site-packages/ppkg_debfile.py", line 244, in _getDataFiles
    tarinfo = tarOutput.gettarinfo(os.path.join(CURRENT), path)
  File "/usr/lib/python2.5/tarfile.py", line 1333, in gettarinfo
    statres = os.lstat(name)
OSError: [Errno 2] No such file or directory: ''

As I am a novice in this area, I may be overlooking something basic. I will provide more information if required.

aspidites 2010-05-23 01:54

Re: PyPackager Help
 
Please post your make.py. The error message out of context isn't very helpful.

Seems to suggest that wherever "self.name_self.version-self.buildversion_self.arch.deb" points to doesn't exist.

I would suspect either a string concatenation error or that the deb is not beign properly generated, and as such can't be stat'd.

EIPI 2010-05-23 02:51

Re: PyPackager Help
 
1 Attachment(s)
Thanks for the reply. Here is the make.py file.

aspidites 2010-05-23 06:48

Re: PyPackager Help
 
I'm not sure if the post/pre install scripts make since. Those files should be in your src directory. (/src/opt). That would also eliminate a dependency (wget).

Anyways, the directory function looks identical to the one on the py2deb page, so unless the src directory is empty (which imagine it is just because of your pre/post install code) then that could be why it is failing.

EIPI 2010-05-23 12:25

Re: PyPackager Help
 
The python files are all located within the /src/opt/ directory.

The dependancy on wget is there to retrieve a utility at installation time.

PyPackager creates the *.tar.gz file correctly, but the *.deb file it created is empty (0 bytes big). I am stumped, as this was working fine for me 2 months ago (the last time I packaged).

aspidites 2010-05-26 05:30

Re: PyPackager Help
 
Still no solution, but interesting bug report to note: https://bugs.maemo.org/show_bug.cgi?id=9894 by the developer himself.

EIPI 2010-05-26 11:37

Re: PyPackager Help
 
I saw the request to remove Khertan's packages from the maemo.org repos when I was searching the mailing lists for help. Unfortunate, but Khertan responded to an inquiry I made in relation to the packaging issues I had, and I found him to be very helpful.

In the end, I commented out the portion of my make.py file where the deb is being made by PyPackager, and went the route of using dpkg to build the final deb for uploading to extras-devel.

Khertan 2010-05-26 15:06

Re: PyPackager Help
 
Quote:

Originally Posted by EIPI (Post 679046)
I saw the request to remove Khertan's packages from the maemo.org repos when I was searching the mailing lists for help. Unfortunate, but Khertan responded to an inquiry I made in relation to the packaging issues I had, and I found him to be very helpful.

In the end, I commented out the portion of my make.py file where the deb is being made by PyPackager, and went the route of using dpkg to build the final deb for uploading to extras-devel.

I ve stopped to publish my apps to extras and extras devel, but i still continue to do apps for maemo, i'm just publishing them to my own repository.

Anyway i still didn't got the time to understand why your make.py script didn't works. Sorry

mwerle 2010-05-31 13:52

Re: PyPackager Help
 
1 Attachment(s)
Hi,

Sorry to hijack this thread, but I've just run into exactly the same problem with my app. All I changed since my last successful build in my mkpkg.py script was to bump the version number.
The other big change of course is upgrading to PR1.2

Running mkpkg.py from the shell aborts with the same error as reported by EIPI. Interestingly enough, I tried running mkpkg.py from within PyGTKEditor and it successfully generated a .deb (although with incorrect installation paths).

Running from PyGTKEditor, the resulting deb tries to install the 'mwtube' file into '/usr/bin/data/mwtube', and not into '/usr/bin/mwtube' as expected.

Looks like PR1.2 broke this app, since I'm still using the same version of pypackger (3.0.15).

Cheers,
- Micha.

mwerle 2010-05-31 20:36

Re: PyPackager Help
 
Ended up hacking pypackager to package my file; posted bug-report on khertan.net.

http://khertan.net/flyspray/index.ph...d=29&project=3


All times are GMT. The time now is 21:08.

vBulletin® Version 3.8.8