Help - Search - Members - Calendar
Full Version: Advanced IPK scripts
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Zaurus - Everything Development > Qt/Qtopia
I'm trying to create a package for the usb-storage module and scripts.

I plan to use the postinst (probably) to decide whether or not to install a certain module (for example if I'm installing on a machine with a PXA processor it won't need the sa1100_bi module.

What's the best way to do this? Can I just not install it, or do I have to install it then delete it in the postinst script?

Along the same lines but more complicated, if I needed to replace a script on only one machine how would I do this? Create a copy in the preinst, then have ipkg overwrite it, then copy the copy back over the one ipkg has extracted using the postinst script?

There are obviously ways and means, but is this the way things are done?

Is there a web site which describes this sort of thing (prsumably for debian dpkg).

Another quick one, is there a quick and easy way to differentiate between machines. Processor is probably fairly easy (look in /proc/cpuinfo), what about ROM type, do I just have to find a file which exists on one and not another?


Might be easier/safer to install the script with an alternate name (e.g. myscript-alt) and then, in postinst, when needed, rename and overwrite the one to be replaced with a single mv.

Google on "debian-binary" and you'll get lots of hits on ipkg docs. I've found that most of them though are a bit superficial.

While we're on the subject of IPK building, I'm having a problem with one that someone may be able to help me with. I'm trying to make an IPK to update Opera 7 for the cseries devices (replace icons with bigger ones and create the missing symlink that is tripping everyone up). When I try installing it ipkg gets a segmentation fault and claims that preinst failed. So I created a simple test IPK to experiment with this and I'm getting the same problem. I can't see why it's happening. The scripts are all 777 root:root and I double checked that there are no carriage-returns (although I'm not sure CRs would cause a problem). My preinst looks like this:


echo "preinst running..."

echo "preinst" >> /home/zaurus/foopk.log

exit 0

The output from ipkg looks like this:

[bivalve]# ipkg install foopk_1.0_arm.ipk

Unpacking foopk...Done.

Configuring foopk...Segmentation fault

//usr/lib/ipkg/info/foopk.preinst failed. Aborting installation of foopk


Any ideas?

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.