English 中文(简体)
debian package creating needed directories in preinst
原标题:

I have the following debian structure:

  • debian/usr/share/test
  • debian/usr/share/test/test
  • debian/usr/share/test/test/a
  • debian/usr/share/test/test/b

After building the package using dpkg-deb --build and installing it using dpkg -i, it doesn t seem to create the folders test automatically if they don t exist. Do I need to create them manually in preinst script?

UPDATE: Issue was because preinst had an error so unpacking didn t get a chance to happen.

Laurent

最佳回答

Look at an example of mine here.

debian/DEBIAN 
debian/usr/bin
debian/usr/lib

You have a couple of choices:

  1. Populate the directories with the files before generating the package (binary package)
  2. Build a source package where MAKE will be called to build the package and install it.

In the first case, you don t need to create the directories through a preinst script: the folder hierarchy will be created if necessary by the package manager when the package is installed.

In the second case, you will need to use mkdir -p to create the folder hierarchy during the install phase.


I have been through 3 different ways of packaging for Debian repositories during the last year and believe me, the details to account for are numerous. One relief was to make the acquaintance of Launchpad and their PPA publishing process.

问题回答

You need those in package named either tmp or the same as your first package listed in debian/control, depending on which version of the debhelper compat mode you choose.

E.g. a call from one of the debhelper example files:

$(MAKE) prefix=`pwd`/debian/`dh_listpackages`/usr install

You are missing that one level of indirection here.





相关问题
Eclipse for android on Debian Lenny

I have installed Eclipse on Debian Lenny after having installed java (apt-get install sun-java6-jre sun-java6-plugin sun-java6-jdk). When I run Eclipse, I have the following message when it comes to ...

Problem during JBoss Launch

I ve a problem with JBoss 3.2.6. When I try to launch it, I get this error. 09:19:22,449 ERROR [StatefulSessionContainer] Starting failed jboss.j2ee:jndiName=TypicalBean,service=EJB java.rmi....

debian package creating needed directories in preinst

I have the following debian structure: debian/usr/share/test debian/usr/share/test/test debian/usr/share/test/test/a debian/usr/share/test/test/b After building the package using dpkg-deb --build ...

About compiling Linux kernel in Debian Live

This is my first time compiling Linux kernel. I am using Debian Live. I used kernel-package to compile and I also added a new system call to return an arbitrary integer value greater than zero. ...

.deb package conffiles problem

I am distributing one of my applications using a .deb package, but have a problem relating to one of the files. The distribution includes a database file which is constantly updated by the app, on a ...

热门标签