Reply
Thread Tools
direx's Avatar
Posts: 102 | Thanked: 153 times | Joined on Feb 2010
#1
Hi there,

I'd like to add a postrm script to my Debian package. The script ony contains a few lines:
Code:
#!/bin/sh
set -e
update-sudoers
#DEBHELPER#
exit 0
Unfortunately, the N900 does not seem to like the Debian package after adding this script:

Code:
Nokia-N900:/home/user# dpkg -i package_0.1-1_armel.deb 
tar: short read
dpkg-deb: subprocess tar returned error exit status 1
dpkg: error processing package_0.1-1_armel.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 qcpufreq_0.1-1_armel.deb
Nokia-N900:/home/user#
When I remove the postrm script and rebuild the Debian package, the N900 is able to install the app again.

Can anybody explain what could cause this behaviour?
 
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#2
This:

Code:
tar: short read
dpkg-deb: subprocess tar returned error exit status 1
hints that the actual package file might have been somehow damaged. Try re-building the package, and re-transferring it to your phone.

Or, it might be you're overclocking too much and that is causing random errors on the N900. (noted the app you are working on )
__________________
Trout have underwater weapons.
 

The Following User Says Thank You to juise- For This Useful Post:
direx's Avatar
Posts: 102 | Thanked: 153 times | Joined on Feb 2010
#3
Originally Posted by juise- View Post
Try re-building the package, and re-transferring it to your phone.
I did that many times. I can even extract the package on the N900, but when I try to install it I always get this error.

Originally Posted by juise- View Post
Or, it might be you're overclocking too much and that is causing random errors on the N900
I don't do any overclocking (and probaly never will)

Thanks for the hints, though.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#4
Might it be the case that the tar archive gets created with a marker for the file but it's not actually added to it?

If tar fails to extract the files in the archive, you should start by finding out why. Perhaps you can play around with deb2tar and see what kind of tar file you get. If it looks broken, check how you create your package.

What tools are you using? Have you tried building the package with dpkg-deb --build <name of staging directory> ?
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#5
I also had this error once. You might want to open the postrm script via "vi" on your device. If you see crippled line endings like "^M" or something, you have your errors (This happens especially when using Windows). If not, it's something different

Last edited by gri; 2010-06-21 at 18:28.
 

The Following User Says Thank You to gri For This Useful Post:
direx's Avatar
Posts: 102 | Thanked: 153 times | Joined on Feb 2010
#6
Originally Posted by Joorin View Post
If tar fails to extract the files in the archive, you should start by finding out why. Perhaps you can play around with deb2tar and see what kind of tar file you get. If it looks broken, check how you create your package.
deb2tar works fine in both cases (with postrm and without it).

Originally Posted by Joorin View Post
What tools are you using? Have you tried building the package with dpkg-deb --build <name of staging directory> ?
I'm using the latest Nokia Qt SDK. To build a package I simply use "mad dpkg-buildpackage" (mad is in my $PATH). I can only use mad, as I am not on a Debian-based distro (Gentoo).

Originally Posted by gri
If you see crippled line endings like "^M" or something, you have your errors.
My postrm script looks fine. No fancy line endings.

Maybe somebody could take a look at the package. I have uploaded both versions:
http://www-user.tu-chemnitz.de/~klad....1-1_armel.deb
http://www-user.tu-chemnitz.de/~klad....1-1_armel.deb

Thanks for your help!

- Dan

Last edited by direx; 2010-06-21 at 18:30.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#7
Originally Posted by direx View Post
Can anybody explain what could cause this behaviour?
I can only presume it's a MADDE problem as your package (cloned from your Git repo) built in Scratchbox - with the postrm script included - installed fine.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
direx's Avatar
Posts: 102 | Thanked: 153 times | Joined on Feb 2010
#8
Originally Posted by qwerty12 View Post
I can only presume it's a MADDE problem as your package (cloned from your Git repo) built in Scratchbox - with the postrm script included - installed fine.
Thanks for the info. Did you add the postrm script after cloning the repo (postrm is not included, as it causes problems for me)?

If you did I'll file a bug about this and I'll give the extras-autobuilder a try for the next release.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#9
Originally Posted by direx View Post
Thanks for the info. Did you add the postrm script after cloning the repo (postrm is not included, as it causes problems for me)?

If you did I'll file a bug about this and I'll give the extras-autobuilder a try for the next release.
Yep. Cloned, copied your postrm script as debian/postrm and ran a dpkg-buildpackage.

FWIW, I've attached the deb that was built in Scratchbox.
Attached Files
File Type: deb qcpufreq_0.1-1_armel.deb (21.0 KB, 93 views)
 
too's Avatar
Posts: 122 | Thanked: 135 times | Joined on Dec 2009 @ Helsinki
#10
Indeed, it fails to install on N900

when extracting on linux desktop pc (the components using ar)
everything works ok (tar's are on right size etc).

but... when copying control.tar (10240 bytes) to n900 and then
running

tar tvf control.tar, at the end it outputs:

-rwxr-xr-x 65534/65534 40 2010-06-21 21:04:57 postrm
tar: short read

Strange. I'll have to check this out...
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:07.