Skip to content
This repository has been archived by the owner. It is now read-only.

kernel config checking #589

Merged
merged 7 commits into from Sep 18, 2017
Merged

kernel config checking #589

merged 7 commits into from Sep 18, 2017

Conversation

@ata2001
Copy link
Member

@ata2001 ata2001 commented Sep 16, 2017

#554

@ata2001 ata2001 force-pushed the kconfig_check branch from e1b0600 to c4dd13a Sep 16, 2017
@ata2001
Copy link
Member Author

@ata2001 ata2001 commented Sep 16, 2017

Could easily be extended to support string or integer options.

Oliver Smith added 3 commits Sep 18, 2017
Oliver Smith
* move is_set() function out of check()
* use a dictionary in the config instead of tuples, so we have
  descriptive variable names instead of option[0] and option[1]
* merge duplicate warning code
* raise exception, when the value is not True/False
Oliver Smith
* Check all configs in an aport, otherwise the selected device's
  arch gets used - which may not make sense when the selected
  device is qemu-amd64 for example.
* Allow specifying multiple kernel packages, and also no packages
  which defaults to scanning all kernel configs (it is super fast
  anyway)
* Add the check to Travis CI
Oliver Smith
@ollieparanoid
Copy link
Member

@ollieparanoid ollieparanoid commented Sep 18, 2017

I have refactored some details to match the rest of the code-base better, and applied the following functional changes:

  • Moved is_set to an own function, and return True/False if it was found or not (the regex function would return None or a regex object otherwise, which means we can't use it in simple True/False checks directly)
  • Raise a meaningful exception, when the config lists something other than True/False as value
  • Return True/False to indicate if the check was successful or not
  • Use that information to raise an exception on failure, when called with "pmbootstrap kconfig_check"
  • Always check the configs of all architectures, not just the current device architecture (otherwise, when qemu-amd64 is the current device, you can't check the other device configs for example)
  • Allow to specify multiple packages/kernels
  • Allow to leave out the packages/kernels argument, check all kernels in that case (it is super fast anyway)
  • Add the check for all kernels to the Travis CI config

I hope that the changes are okay with you - please tell me if you don't like any of this and I'll revert it. Thanks a lot for making this PR, I'm sure this will prevent a lot of frustration caused by wrong kernel configs.

@ata2001
Copy link
Member Author

@ata2001 ata2001 commented Sep 18, 2017

It's much better now.

Oliver Smith added 2 commits Sep 18, 2017
Oliver Smith
(I've had to put in a lot of defaults in the aarch64
linux-postmarketos configs, that's why the diff is a bit unclean.)
Oliver Smith
@ollieparanoid ollieparanoid merged commit ae6a58b into master Sep 18, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ollieparanoid ollieparanoid deleted the kconfig_check branch Sep 18, 2017
PureTryOut added a commit that referenced this pull request Feb 21, 2018
* Check kernel config
* Allow specifying multiple kernel packages, and also no packages
  which defaults to scanning all kernel configs (it is super fast
  anyway)
* Add the check to Travis CI
* Adjust existing kernel configs, so they pass the kconfig_check.
(We've had to put in a lot of defaults in the aarch64
linux-postmarketos configs, that's why the diff is a bit unclean.)
* Increase modified kernel pkgrels
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.