OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio


Welcome Guest ( Log In | Register )

> Advanced IPK scripts
post Mar 4 2004, 02:07 AM
Post #1

Group: Members
Posts: 4,512
Joined: 25-October 03
From: Bath, UK
Member No.: 464

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?


Go to the top of the page
+Quote Post
Start new topic
post Mar 4 2004, 08:28 AM
Post #2

Group: Members
Posts: 233
Joined: 2-December 03
From: Boston, MA
Member No.: 1,029

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?

Go to the top of the page
+Quote Post

Posts in this topic
lardman   Advanced IPK scripts   Mar 4 2004, 02:07 AM
raybert   Might be easier/safer to install the script with a...   Mar 4 2004, 08:28 AM

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd May 2018 - 02:27 AM