Reply
Thread Tools
zerojay's Avatar
Posts: 2,669 | Thanked: 2,555 times | Joined on Apr 2007 @ Halifax, Nova Scotia, Canada
#1
I'm using py2deb for packaging and I'm running into two problems.

1) My package isn't meant to actually install anything. All it does is edit the Internet Radio database. If my src folder is empty, the package doesn't get built. As a workaround, I've added a small dummy file to be installed/removed.

2) I cannot get pre/post install or pre/post remove scripts to run whatsoever. I've tried several different forms of the line and nothing has worked out for me. So those of you that are using it, what line are you using exactly?

(qole, I checked out your build script and your solution didn't work for me either.)

Here's the error I get:
dpkg (subprocess): unable to execute new pre-installation script: Exec format error
subprocess pre-installation script returned error exit status 2

The package is in extras-devel as "digitallyimported", so you can try it yourself to see the errors generated.

The line I'm using right now, which also isn't working is:
p.preinstall = "preinst.sh"
p.preremove = "prerm.sh"

Any ideas?

Last edited by zerojay; 2010-02-10 at 14:22.
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#2
Well preinst script contains one line "preinst.sh", which obviously won't work. btw src folder isn't empty, there is /home/user/.difm file.

My idea is to forget py2deb and just write your scripts directly where they belong.
 

The Following User Says Thank You to mikkov For This Useful Post:
zerojay's Avatar
Posts: 2,669 | Thanked: 2,555 times | Joined on Apr 2007 @ Halifax, Nova Scotia, Canada
#3
Originally Posted by mikkov View Post
Well preinst script contains one line "preinst.sh", which obviously won't work. btw src folder isn't empty, there is /home/user/.difm file.

My idea is to forget py2deb and just write your scripts directly where they belong.
I know that src isn't empty. I put .difm in there to avoid the issue where it wouldn't build without a file there.

Write my scripts directly where they belong? I have no idea what that even means. Where do my scripts belong then?

Other packages used what I did above and apparently work.

Thanks, I guess I'll just write it all directly into the build file... it's going to end up HUGE. lol

Last edited by zerojay; 2010-02-10 at 14:52.
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#4
Originally Posted by zerojay View Post
I know that src isn't empty. I put .difm in there to avoid the issue where it wouldn't build without a file there.
Well put it at least somewhere else than user's home directory.

Originally Posted by zerojay View Post
Write my scripts directly where they belong? I have no idea what that even means. Where do my scripts belong then?
There is debian/preinst and debian/prerm files in your source package. But I gues py2deb users never see the source package contents.
 

The Following User Says Thank You to mikkov For This Useful Post:
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#5
its hard for me to comment much, I'm running a forked version of py2deb (I need to get my changes integrated upstream...).

I think py2deb supports both specifying the a file for the scripts or taking in the script body. I've not tried specifying a file but I have successfully specified the body of the script and have been doing so long before I forked py2deb.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following User Says Thank You to epage For This Useful Post:
zerojay's Avatar
Posts: 2,669 | Thanked: 2,555 times | Joined on Apr 2007 @ Halifax, Nova Scotia, Canada
#6
Originally Posted by epage View Post
its hard for me to comment much, I'm running a forked version of py2deb (I need to get my changes integrated upstream...).

I think py2deb supports both specifying the a file for the scripts or taking in the script body. I've not tried specifying a file but I have successfully specified the body of the script and have been doing so long before I forked py2deb.
Yeah, I just decided to throw it all into the build_whatever.py script and see how it goes. What changes did you make to your forked version of py2deb?
 
zerojay's Avatar
Posts: 2,669 | Thanked: 2,555 times | Joined on Apr 2007 @ Halifax, Nova Scotia, Canada
#7
Originally Posted by mikkov View Post
Well put it at least somewhere else than user's home directory.
Okay, since I now have the scripts working, where do you think I should put my little empty file to satisfy py2deb?

Last edited by zerojay; 2010-02-10 at 16:10.
 
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#8
Originally Posted by zerojay View Post
Yeah, I just decided to throw it all into the build_whatever.py script and see how it goes. What changes did you make to your forked version of py2deb?
I can't really remember these days. I went up-upstream (generic debian version). I fixed some bugs in it, merged in the Maemo changes, made it all work on the desktop, made it all one file, added all of the maemo specific fields, added some recommends fields, etc. I don't know how many changes are now in the Maemo version of py2deb.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following User Says Thank You to epage For This Useful Post:
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#9
@epage: Did you never get back in contact with Khertan?
(IIRC we were in contact about this some weeks ago)
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#10
Originally Posted by zerojay View Post
Okay, since I now have the scripts working, where do you think I should put my little empty file to satisfy py2deb?
What happens if you put a dummy file into your src/dev/null subfolder ? I know that /null is not a folder, but perhaps it works?
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."

Last edited by twaelti; 2010-02-10 at 16:25.
 
Reply

Tags
deb, packaging, postinst, preinst, py2deb


 
Forum Jump


All times are GMT. The time now is 11:34.