2
1

lib_defconfig.py 576 B

1234567891011121314151617181920
  1. # See utils/checkpackagelib/readme.txt before editing this file.
  2. from checkpackagelib.base import _CheckFunction
  3. class ForceCheckHash(_CheckFunction):
  4. """Checks that a defconfig does force checking all hashes"""
  5. def before(self):
  6. self.forces = False
  7. def check_line(self, lineno, text):
  8. if self.forces:
  9. return
  10. if text == "BR2_DOWNLOAD_FORCE_CHECK_HASHES=y\n":
  11. self.forces = True
  12. def after(self):
  13. if not self.forces:
  14. return [f"{self.filename}:0: missing BR2_DOWNLOAD_FORCE_CHECK_HASHES"]