Tuesday, June 17, 2008

Fixing problems with Debian installation scripts

Debian packages are usually of very high quality. The packages may have installation scripts that are executed before or after installation or removal. They're called preinst, postinst, prerm, postrm.

Those scripts almost never have to be changed because they rarely have problems, unless you're creating your own packages and make a mistake, like I did. And when you make a mistake in those scripts you may be unable to remove or reinstall the package.

I don't think it's well known that one can easily fix or change installation or removal scripts in Debian packages once the've been installed. My good friend Paul Cannon pointed out to me that you can modify them at /var/lib/dpkg/info/$packagename.{prerm|postrm|preinst|postinst}.

No comments:

Post a Comment