Skip to content

CI: kconfig: don't print unrelated warnings

Administrator requested to merge fix-ci-kconfig-check-warnings into master

EDIT: Updated commit message after discussion below:

Run the "pmbootstrap kconfig check" only on the kernels that have been
modified.

Previous commit message:

(The >180 is probably wrong, probably a regression in my WIP pmbootstrap kconfig check code.)

As of writing, this CI check prints >180 warnings when it passes. This
is a big problem: when the user adds/modifies a kernel and the check
starts failing, a few warnings will be added but it is not obvious
which warnings actually cause the test to fail and which ones don't.

The reason for this is that since 4a6c5657 ("pmb.parse.kconfig: don't
enforce non-core checks for testing devices") in pmbootstrap.git, the
"pmbootstrap kconfig check" code will only fail for testing (and
unmaintained) devices if one of the base checks that are absolutely
required to boot postmarketOS are failing. But if any of the additional
checks that can be enabled with options="pmb:kconfigcheck-…" in the
APKBUILD isn't passing, then we get the warnings without failure.

I think it made sense to not let pmbootstrap fail there so we can
adjust the kconfig checks faster, without the need to adjust all
testing devices. Maybe we can enforce it again and adjust all devices
quickly once there is "pmbootstrap kconfig check --fix" (pmb#2190).

In the meantime, this patch makes the check userfriendly again:
* run "pmbootstrap kconfig check $pkgname" for main and community kernels
* run "pmbootstrap kconfig check --file ..." for testing and
  unmaintained kernels, so it does not take additional options from
  APKBUILD into account
* print which kernel is getting checked and if there are errors, print a
  summary at the end with the shell commands the user needs to run to
  fix this / run the test again

I've also considered implementing this in pmbootstrap, and replacing
the default behavior of "pmbootstrap kconfig check" without argument
for testing a specific kernel with the behavior the CI test has now. It
would be even better, as it would be faster and wouldn't run users to
run a different command to get the more useful output. But also this is
more effort, it will require some refactoring and rethinking the
command-line arguments of pmbootstrap kconfig check... so since I
consider this quite the important usability issue I decided to submit
this simpler implementation first.

Fix #1799 (closed)

Edited by Administrator

Merge request reports

Loading