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

Bug#664211: add check for wrong dependency on debconf



On 2012-03-16 20:14, Russ Allbery wrote:
> Joey Hess <joeyh@debian.org> writes:
> 
>> cdebconf has gotten to be a quite usable replacement for debconf.
>> However, in trying to remove debconf from my system, I found there
>> were several packages with wrong dependencies, like this:
> 
>> Depends: debconf (>= 0.5) | debconf-2.0, debconf
> 
>> That never makes sense, so I think lintian should detect it.
> 
> Yes... in fact, it would be good to diagnose the more general problem,
> where one dependency fully satisfies another dependency.  I think we
> already have infrastructure to do that but only apply it across different
> dependency types (checking whether Recommends is already satisfied by
> Depends, for example).
> 
> [...]
>

I suspect you are thinking of stronger-dependency-implies-weaker and
duplicate-in-relation-field (from checks/control-file).  I noticed the
the following comment (modulo layout changes due to stupid MUA) in
Lintian::Relation::duplicates:

"""
# The logic here is a bit complex in order to merge sets of duplicate
# dependencies.  We want foo (<< 2), foo (>> 1), foo (= 1.5) to end up
# as one set of duplicates, even though the first doesn't imply the
# second.
"""

I suspect the problem is that (in "strict" logic):

  Not (( "debconf (>= 0.5) | debconf-2.0" => "debconf" ))
    - One could pick debconf-2.0, which does not imply debconf.

  Not (( "debconf" => "debconf (>= 0.5) | debconf-2.0" ))
    - debconf "could" be << 0.5, in which case debconf-2.0 must be
      chosen.

Of course, "we" (as humans) know that debconf has long been >= 0.5, but
Lintian can generally not infer this.  As an example, we have a similar
case in Lintian's own Build-Depends:

    perl,
    perl (>= 5.12) | libtest-simple-perl (>= 0.93),

Except here "perl" does not imply "perl (>= 5.12)" (in stable).  So it
smells like we need a "case-by-case" handling or maybe a data file.

On a related note, #668153 seems to be a very similar issue.

~Niels




Reply to: