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

Bug#656882: lintian: false-positive package-relation-with-self



clone 656882 -1
retitle 656882 [new check] warn about incorrect §7.6.2 usage
severity 656882 wishlist
thanks

On 2012-01-22 21:10, Russ Allbery wrote:
> Niels Thykier <niels@thykier.net> writes:
> 
>> By the looks of it [1], Lintian does not handle self relations too
>> well with Replaces + Provides.
> 
>> The observation done so far is that xabacus (Provides, Conflicts and
>> Replaces itself) is correctly done (in terms of §7.6.2).
> 
>> The apache2-suexec package does not provide itself (but it has
>> Conflicts and Replaces on itself).  The question is whether or not it
>> needs the provide itself explicitly.
> 
> I don't think it should, although the dpkg maintainers would know for
> sure.  But I suspect Lintian should say that's fine in the case where the
> virtual package name is the same as the real package name, as it is in
> this case.
> 

We are looking at §7.4 I guess:

"""
A special exception is made for packages which declare a conflict with
their own package name, or with a virtual package which they provide
(see below): this does not prevent their installation, and allows a
package to conflict with others providing a replacement for it. You use
this feature when you want the package in question to be the only
package providing some feature.
"""

This smells like "Provides: $self" is redundant.  However, I also found
this:

"""
Conflicts should be used

    [...]

    in conjunction with Provides when only one package providing a
    given virtual facility may be unpacked at a time (see Virtual
    packages - Provides, Section 7.5),
"""

I suspect people reading the "in conjunction with Provides" as "Always
add the Provides field".

In terms of dpkg, I get the feeling that "either way works".

>> Also not sure what is up with nvidia-kernel-dkms.  By the looks of it,
>> it is using §7.6.2, but missing a replaces.  Russ, is that correctly
>> asserted of me?
> 
> Yes, that looks correct.  I think that set of packages should all have
> Replaces as well.
> 

Okay, I guess it would be good to have a separate tag for checking
proper §7.6.2 usage.

For now I will commit a fix to ignore "Replaces: $self" and "Provides:
$self" with a "Closes" for the cloned bug.  This bug (i.e. #656882)
stays until we get the §7.6.2 check implemented.

~Niels




Reply to: