[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

file trigger and dpkg aborting due to dependency errors



Hi,

I have a little problem with file triggers.

I have a tool (qlustar-image-common) that builds a root filesystem image
from a set of modules. The tool has a file trigger on
/usr/lib/qlustar/modules. Now I have 2 modules: core and ha. The core
module contains a minimal bootable system and the ha modules adds high
availability stuff to it. The ha module depends on the core module.

Now here is what happens:

% sudo dpkg -i ../qlustar-module-ha-lucid-amd64-7.4.1_7.4.1~exp+2011-03-30+15.27_all.deb

(Reading database ... 94836 files and directories currently installed.)
Preparing to replace qlustar-module-ha-lucid-amd64-7.4.1
7.4.1~exp+2011-03-30+15.14 (using
.../qlustar-module-ha-lucid-amd64-7.4.1_7.4.1~exp+2011-03-30+15.27_all.deb)
...
Unpacking replacement qlustar-module-ha-lucid-amd64-7.4.1 ...
dpkg: dependency problems prevent configuration of
qlustar-module-ha-lucid-amd64-7.4.1:
 qlustar-module-ha-lucid-amd64-7.4.1 depends on qlustar-module-core-lucid-amd64-7.4.1 (= 7.4.1~exp+2011-03-30+15.27); however:
  Version of qlustar-module-core-lucid-amd64-7.4.1 on system is 7.4.1~exp+2011-03-30+14.37.
dpkg: error processing qlustar-module-ha-lucid-amd64-7.4.1 (--install):
 dependency problems - leaving unconfigured
Processing triggers for qlustar-image-common ...
qlustar-image-common: triggered /usr/lib/qlustar/modules
....


As you can see the the ha module can not be configure due to
dependencies. But the file trigger is run none the less. This causes
images to be build with a version skew between the core and ha
module. Can this be avoided?


% sudo dpkg -i ../qlustar-module-core-lucid-amd64-7.4.1_7.4.1~exp+2011-03-30+15.27_all.deb 

(Reading database ... 94836 files and directories currently installed.)
Preparing to replace qlustar-module-core-lucid-amd64-7.4.1 7.4.1~exp+2011-03-30+14.37 (using .../qlustar-module-core-lucid-amd64-7.4.1_7.4.1~exp+2011-03-30+15.27_all.deb) ...
/var/lib/dpkg/info/qlustar-module-core-lucid-amd64-7.4.1.prerm upgrade 7.4.1~exp+2011-03-30+15.27
Unpacking replacement qlustar-module-core-lucid-amd64-7.4.1 ...
Setting up qlustar-module-core-lucid-amd64-7.4.1 (7.4.1~exp+2011-03-30+15.27) ...
Processing triggers for qlustar-image-common ...
qlustar-image-common: triggered /usr/lib/qlustar/modules
...

Installing the core module works fine and the file trigger is run as expected.
This luckily fixes the images as they are generated again.

And last:

% sudo dpkg --configure qlustar-module-ha-lucid-amd64-7.4.1
Setting up qlustar-module-ha-lucid-amd64-7.4.1 (7.4.1~exp+2011-03-30+15.27) ...

The file trigger is not run again. For me this is not a problem right
now. But what if the postinst of the ha module needs to be run before
the file trigger is to be run?

Or actualy it is a problem right now because I need the depends of my
package to be satisfied before the file trigger is run.

What are my options here? Do I need to Pre-Depend on the core module or
do I need to use an explicit trigger in the modules postinst scripts?

MfG
        Goswin


Reply to: