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

Bug#593177: Clarify when dependencies of pre-dependencies are satisfied

Package: debian-policy
Severity: wishlist

Steve Langasek wrote:
> On Sun, Aug 08, 2010 at 07:27:44PM -0500, Jonathan Nieder wrote:

>> Except *new* dependencies of an upgraded pre-depedency may not be
>> present.  This is part of the philosophy behind pseudo-essential
>> packages generally using pre-depends for one release when they
>> acquire new dependencies.
>> Should I file a policy bug to clarify this?
> I think that would be a good idea, yes - thanks!

Consider a (hypothetical) scenario:

	x11-common pre-depends on debconf | cdebconf
	cdebconf 0.150 depends on libslang2 (>= 2.0.7-1)

cdebconf 0.150 is installed.  Version 0.151 depends on libslang3
instead of libslang2.  Time to upgrade.

 dpkg --unpack cdebconf_0.151.deb x11-common_1:7.5+7.deb libslang3_0.deb

 - The upgraded cdebconf is unpacked.

 - The upgraded x11-common is to be unpacked.

   As discussed in Bug#504880, since cdebconf was previously
   configured and has not been removed since then, x11-common’s
   pre-dependency is considered satisfied[1].

 - x11-common.preinst is run.  The updated cdebconf cannot even
   be started because its dependency libslang3.  Failure.

Therefore if your package might be used in preinst (e.g., if it is
debconf or pseudo-essential) then any new dependency for that
functionality needs to go in Pre-Depends for a short while.

Patch to follow once Bug#504880 settles down.

[1] For those following along at home, depisok() is called with last
argument true.

Reply to: