Kaynağa Gözat

utils/check-symbols: allow BR2_BROKEN to be unused

Commit [1] introduced the BR2_BROKEN hidden symbol. The intent of
this symbol is to temporarily mark a configuration known to be broken.
This commit was added to fix an undefined usage of the symbol, in a
previous commit [2].

With this somewhat special symbol, it is also perfectly normal to
have no use of it.

Running the command "utils/check-symbols" in a state there is no usage
of the BR2_BROKEN, the script fails with output:

    Config.in:15: BR2_BROKEN defined but not referenced

This commit adds an exception for this symbol, allowing it to be
unused in the whole Buildroot tree.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8925433382

[1] https://gitlab.com/buildroot.org/buildroot/-/commit/2ddc5808cd19f577917566ad83e2a3835d6d43b9
[2] https://gitlab.com/buildroot.org/buildroot/-/commit/11a8cdd2bbbd0ef4adf600e4792d75f6f2122ec8

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit fa9823907405bd775e43d24c00fe2ab5cda050a0)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Julien Olivain 6 ay önce
ebeveyn
işleme
78b24e5aef
2 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 4 0
      utils/checksymbolslib/br.py
  2. 2 0
      utils/checksymbolslib/db.py

+ 4 - 0
utils/checksymbolslib/br.py

@@ -45,6 +45,10 @@ symbols_not_defined_for_fake_virtual_packages = [
     'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BUILDROOT',
     'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BARE_METAL_BUILDROOT',
 ]
+# Config.in
+symbols_possibly_unused = [
+    'BR2_BROKEN',
+]
 # fs/common.mk
 suffixes_not_defined_for_all_rootfs_types = [
     '_BZIP2',

+ 2 - 0
utils/checksymbolslib/db.py

@@ -155,6 +155,8 @@ class DB:
                 continue
             if legacy_usage in entries:
                 continue
+            if symbol in br.symbols_possibly_unused:
+                continue
             if symbol in br.symbols_used_only_in_source_code:
                 continue
             if symbol in br.symbols_used_only_for_host_variant: