![]() |
Debian package: postrm script causes errors
Hi there,
I'd like to add a postrm script to my Debian package. The script ony contains a few lines: Code:
#!/bin/sh Code:
Nokia-N900:/home/user# dpkg -i package_0.1-1_armel.deb Can anybody explain what could cause this behaviour? |
Re: Debian package: postrm script causes errors
This:
Code:
tar: short read 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 ;)) |
Re: Debian package: postrm script causes errors
Quote:
Quote:
Thanks for the hints, though. |
Re: Debian package: postrm script causes errors
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> ? |
Re: Debian package: postrm script causes errors
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 :)
|
Re: Debian package: postrm script causes errors
Quote:
Quote:
Quote:
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 |
Re: Debian package: postrm script causes errors
Quote:
|
Re: Debian package: postrm script causes errors
Quote:
If you did I'll file a bug about this and I'll give the extras-autobuilder a try for the next release. |
Re: Debian package: postrm script causes errors
1 Attachment(s)
Quote:
FWIW, I've attached the deb that was built in Scratchbox. |
Re: Debian package: postrm script causes errors
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... |
Re: Debian package: postrm script causes errors
Interesting:
tar cvf foo.tar conffiles control md5sums postinst postrm gives me 20480 byte file. even adding all those sizes (rounded up to 512 bytes) 7168 (and if rounded to 1024, max 10240 bytes) Still (gnu) tar wants to build 20480 byte file. I'll have to figure this out... Thanks for the report. EDIT: OK, there needs to be 1024-aligned page with zeroes, and then size multiple if 10240... Oh my, why is that tar so picky ;/ |
Re: Debian package: postrm script causes errors
I guess this really is a MADDE bug. I've created a debian source package with "mad dpkg-buildpackage -sa -S" and uploaded it to the autobuilder.
The package created by the autobuilder (containing the postrm script) installed fine - the same package created directly by "mad buildpackage" failed to install. I've filed a bug about this. |
Re: Debian package: postrm script causes errors
I've committed fix to our repository. Will be in gitorius next week.
Anyone adventurous may want to help me testing this: go download http://www.iki.fi/too/sw/tarlisted/tarlisted-3.0.tar.gz extract and compile and then run Code:
madbin_dir=`mad query install-dir`/madbin |
Re: Debian package: postrm script causes errors
I'm using the Windows version of new Nokia Qt SDK.
So can you give me advices because this download http://www.iki.fi/too/sw/tarlisted/tarlisted-3.0.tar.gz is for linux users. Thanks. |
Re: Debian package: postrm script causes errors
Quote:
I just build windows binary for someone who privately asked: In windows, first start 'MADDE Terminal' In case of Nokia Qt SDK, launch command C:\NokiaQtSDK\Maemo\4.6.2\madde.bat (either via command line or via file browser) then enter Code:
|
Re: Debian package: postrm script causes errors
Just an idea:
Check whether the file uses UNIX line endings. I once had a similar script which had an issue because I saved it with Windows line endings. |
Re: Debian package: postrm script causes errors
Windows line endings are problematic, but not cause here.
|
Re: Debian package: postrm script causes errors
Thanks, that worked for me on similar case.
|
Re: Debian package: postrm script causes errors
Quote:
I got the same problem , but I didn't make any script like postrm , I just added few more images to the package. Anyway, it has solved my problem. |
All times are GMT. The time now is 20:18. |
vBulletin® Version 3.8.8