pkgcore / pkgcheck

pkgcore-based QA utility for ebuild repos
https://pkgcore.github.io/pkgcheck
BSD 3-Clause "New" or "Revised" License
34 stars 29 forks source link

Feature request, new check: Perl virtual dependencies #593

Closed akhuettel closed 12 months ago

akhuettel commented 1 year ago

Here's a wish for a new check. (@thesamesam @arthurzam)

Example: dev-perl/XXX-0.380.0

BDEPEND="${RDEPEND}
        virtual/perl-ExtUtils-MakeMaker
"

Triggers a warning since the dependency on virtual/perl-ExtUtils-MakeMaker in BDEPEND does not specify any version (i.e., no =, <, >, ~, ...)

If this ever goes into CI, all current warnings will have to be grandfathered in since otherwise things explode.

thesamesam commented 1 year ago

We can use the implementation of MissingPackageRevision for some inspiration, maybe

arthurzam commented 1 year ago
  1. Is it relevant only to ebuilds inheriting perl eclass, or all packages?
  2. Thank for the precise logic, but what is the issue that requires this? I need this for the documentation and explanation :)
akhuettel commented 1 year ago
1. Is it relevant only to ebuilds inheriting perl eclass, or all packages?

All packages

2. Thank for the precise logic, but what is the issue that requires this? I need this for the documentation and explanation :)

The virtuals stand for packages that have releases both as part of dev-lang/perl and standalone. Apart from rare special cases, if you require "any" version of such a virtual, this will always be fulfilled by dev-lang/perl.

For a long time we had the policy that also version-less dependencies on Perl virtuals should be added to packages. I want to change that, since these dependencies are pointless and obscure which virtuals are still needed. Reducing the number of Perl virtuals would be great, and once we have only version dependencies in the tree it's trivial to see which ones are obsolete and which ones not.