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

[Bug]: `SourcingCheck` does not work if additional packages are passed on command-line #688

Open mgorny opened 1 week ago

mgorny commented 1 week ago

Is there an existing issue for this?

Current Behavior

$ pkgcheck scan -c SourcingCheck,VisibilityCheck dev-python/shiboken2
dev-python/shiboken2
  SourcingError: version 5.15.14: failed sourcing ebuild: LLVM_COMPAT does not contain any valid versions (all older than 16?), (llvm-r1.eclass, line 122:  called die)
$ pkgcheck scan -c SourcingCheck,VisibilityCheck dev-python/shiboken2 nonexist/nonexist --exit error
$ echo $?
0

This is with llvm-r1.eclass modified the following way:

diff --git a/eclass/llvm-r1.eclass b/eclass/llvm-r1.eclass
index 075df9218be8..2169157b5e08 100644
--- a/eclass/llvm-r1.eclass
+++ b/eclass/llvm-r1.eclass
@@ -54,7 +54,7 @@ inherit llvm-utils
 # @DESCRIPTION:
 # Oldest supported LLVM slot.  This is used to automatically filter out
 # unsupported LLVM_COMPAT values.
-_LLVM_OLDEST_SLOT=15
+_LLVM_OLDEST_SLOT=16

 # @ECLASS_VARIABLE: _LLVM_NEWEST_STABLE
 # @INTERNAL

Expected Behavior

SourcingError displayed for the matched package.

pkgcheck version

0.10.30

pkgcore version

0.12.27

mgorny commented 1 week ago

Actually, it seems not to work for anything but the ultimate package:

$ pkgcheck scan -c SourcingCheck app-portage/flaggie dev-python/shiboken2
dev-python/shiboken2
  SourcingError: version 5.15.14: failed sourcing ebuild: LLVM_COMPAT does not contain any valid versions (all older than 16?), (llvm-r1.eclass, line 122:  called die)
$ pkgcheck scan -c SourcingCheck dev-python/shiboken2 app-portage/flaggie