0

I had a quick dpkg/debian-izing question. I am trying to create a .deb(by hand - mostly for learning purposes) and I have rolled up an ar-chive with the control.tar.gz, data.tar.gz and the debian-binary files.

This hand-rolled .deb works fine for regular installs, purges et al. However when I specify an --instdir at install time, dpkg reports a 'file not found' error when trying to run the postinst script. This is not an issue with the prerm script, btw(which works fine).

Running dpkg with --debug=2000 and looking at /var/log/dpkg.log didn't help much.

Any thoughts on why this could be happening?

TIA.


To give some more context and pose another question: I am trying to get --instdir to work mostly because the top level directory to which my package contents get installed is also a mount point and on doing dpkg -P foo, dpkg attempts to remove this directory. If anyone can suggest a workaround for this, that would serve my purpose too(i.e. I wouldn't need --instdir to work). Also, this top-level directory is not empty, so not sure why dpkg is attempting to remove it. Putting a .placeholder file in there didn't help either.

1 Answers1

0

As it is listed here (https://stackoverflow.com/questions/8921626/run-time-installation-directory-of-debian-package-contents) dynamic directory paths are not supported in deb packages with prepackaged binaries. But you can specify the directory path not at runtime but in your control file. And for easy making of packages you can use some graphical tools (ex., mentioned here: https://askubuntu.com/questions/8055/graphical-tool-for-creating-deb-packages).

Meriadoc Brandybuck
  • 1,300
  • 9
  • 11