Re: dpkg -i first.dep second.dep: installs but does not configure one?
On 2014-04-10 17:02 +0200, Steffen Dettmer wrote:
> On Thu, Apr 3, 2014 at 7:35 PM, Sven Joachim <firstname.lastname@example.org> wrote:
>> > Le 03.04.2014 11:46, Steffen Dettmer a écrit :
>> > > $ dpkg -i first.dep second.dep
>> > >
>> > > pre-dependency problem:
>> > > nd-second pre-depends on nd-first
>> > > nd-first is unpacked, but has never been configured.
>> dpkg is smart enough to figure out the order in which
>> packages need to be configured.
> Isn't it a bug then, that if dpkg is even smart enough to figure
> out the configuration order, but is not smart enough to figure
> out the order in which packages need to be unpacked?
Possibly. Note that dpkg's philosophy is pretty much to "do as I say",
and reordering during unpacking may change the outcome, if multiple
versions of the same package are given on the commandline. For the case
of Pre-Depends it would not even help.
>> Rather the problem is that both packages are _unpacked_ before
>> the first one is configured, and this is where the
>> pre-dependency is not fulfilled.
>> > Other that that, why are you using pre-depends and not depends? That
>> > would fix the problem.
> I still unsure if I found the right answer, but I think the
> reason for Pre-Depends is, that one package "debian/preinst"
> script depends on another package being installed. The preinst
> script creates a partion and a file system which might be
> needed to install/unpack further packages on; for the creation, it
> needs configured contents from the package it pre-depends on.
> The idea was to have a package that provides this file system and
> other packages that need it can depend on it. These further
> packages should be able to unpack directly on this filesystem.
That's a somewhat weird usecase, I would rather not use packages to
create filesystems. But you are of course free to do that.
> In in short, before unpacking further.deb, filesystem.deb has not
> only to be unpackaged but full installed (configured).
So the Pre-Depends is actually necessary, it seems.
> What would be the right way to do this?
If you cannot use apt, I don't know. Maybe you could set up a local
repository with dpkg-scanpackages and use dselect's "mounted" access
> Is this a bug in dpkg?
I don't think so.