Skip to contentSkip to conversation

package/psplash: drop 'default n' for fullscreen mode

PATCH Applied Peter Korsgaard 2 participants 6 messages Nov 12, 2025 – Nov 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/psplash: drop 'default n' for fullscreen mode

Commit a028f0a51de0ed ("package/psplash: add support for fullscreen config option") added a 'default n' line to Config.in, but booleans default to 'n', so we typically do not add such redundant lines.

---
 package/psplash/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/psplash/Config.in +0 -1
index ca39cd0ee3..118801e8ef 100644
@@ -49,7 +49,6 @@ config BR2_PACKAGE_PSPLASH_STARTUP_MSG
 
 config BR2_PACKAGE_PSPLASH_FULL_SCREEN
 	bool "use fullscreen mode"
-	default n
 	help
 	  Enable displaying the psplash image in fullscreen mode.
 
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/3 package/pppd: drop 'default n' for cbcp option

Commit 53a302c6ed2a ("package/pppd: Add an option to enable/disable CBCP support.") added a 'default n' line to Config.in, but booleans default to 'n', so we typically do not add such redundant lines.

---
 package/pppd/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/pppd/Config.in +0 -1
index 64bf2d12f2..14d3769a1d 100644
@@ -13,7 +13,6 @@ if BR2_PACKAGE_PPPD
 
 config BR2_PACKAGE_PPPD_CBCP
 	bool "CBCP (Callback Control Protocol)"
-	default n
 	help
 	  Enable Callback Control Protocol (CBCP) support in pppd.
 	  https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cbcp/.
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/3 utils/check-package: add a check for 'default n' in Config.in files

In reply to Peter Korsgaard

Boolean Config.in symbols default to 'n', so we typically do not add such redundant lines.

---
 utils/checkpackagelib/lib_config.py      | 11 ++++++++
 utils/checkpackagelib/test_lib_config.py | 33 ++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
utils/checkpackagelib/lib_config.py +11 -0
index bf975d7a3b..202baa7f1b 100644
@@ -242,6 +242,17 @@ class Indent(_CheckFunction):
                         text]
 
 
+class NoDefaultN(_CheckFunction):
+    DEFAULTN = re.compile(r"^\tdefault n$")
+
+    def check_line(self, lineno, text):
+        text_nocomments = text.split("#")[0].rstrip()
+        if self.DEFAULTN.match(text_nocomments):
+            return ["{}:{}: boolean symbols default to 'n', so 'default n' is redundant"
+                    .format(self.filename, lineno),
+                    text]
+
+
 class RedefinedConfig(_CheckFunction):
     CONFIG = re.compile(r"^\s*(menu|)config\s+(BR2_\w+)\b")
     IF = re.compile(r"^\s*if\s+([^#]*)\b")
utils/checkpackagelib/test_lib_config.py +33 -0
index 474d17105e..35614ef152 100644
@@ -387,6 +387,39 @@ def test_Indent(testname, filename, string, expected):
     assert warnings == expected
 
 
+NoDefaultN = [
+    ('good example',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault y\n',
+     []),
+    ('default n',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n\n']]),
+    ('default n with comment',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n # this is a comment\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n # this is a comment\n']]),
+    ('default n with trailing whitespace',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n  \t\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n  \t\n']])
+    ]
+
+
[email protected]('testname,filename,string,expected', NoDefaultN)
+def test_NoDefaultN(testname, filename, string, expected):
+    warnings = util.check_file(m.NoDefaultN, filename, string)
+    assert warnings == expected
+
+
 RedefinedConfig = [
     ('no redefinition',
      'any',
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 3/3] utils/check-package: add a check for 'default n' in Config.in files

Quoted 4 lines · Peter Korsgaard

Boolean Config.in symbols default to 'n', so we typically do not add such redundant lines.

Applied to 2025.02.x and 2025.08.x, thanks.

Regards,
Arnout

Quoted 61 lines
---
  utils/checkpackagelib/lib_config.py      | 11 ++++++++
  utils/checkpackagelib/test_lib_config.py | 33 ++++++++++++++++++++++++
  2 files changed, 44 insertions(+)
utils/checkpackagelib/lib_config.py +11 -0
index bf975d7a3b..202baa7f1b 100644
@@ -242,6 +242,17 @@ class Indent(_CheckFunction):
                          text]
 
 
+class NoDefaultN(_CheckFunction):
+    DEFAULTN = re.compile(r"^\tdefault n$")
+
+    def check_line(self, lineno, text):
+        text_nocomments = text.split("#")[0].rstrip()
+        if self.DEFAULTN.match(text_nocomments):
+            return ["{}:{}: boolean symbols default to 'n', so 'default n' is redundant"
+                    .format(self.filename, lineno),
+                    text]
+
+
  class RedefinedConfig(_CheckFunction):
      CONFIG = re.compile(r"^\s*(menu|)config\s+(BR2_\w+)\b")
      IF = re.compile(r"^\s*if\s+([^#]*)\b")
utils/checkpackagelib/test_lib_config.py +26 -0
index 474d17105e..35614ef152 100644
@@ -387,6 +387,39 @@ def test_Indent(testname, filename, string, expected):
      assert warnings == expected
 
 
+NoDefaultN = [
+    ('good example',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault y\n',
+     []),
+    ('default n',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n\n']]),
+    ('default n with comment',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n # this is a comment\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n # this is a comment\n']]),
+    ('default n with trailing whitespace',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     '\tdefault n  \t\n',
+     [['any:2: boolean symbols default to \'n\', so \'default n\' is redundant',
+       '\tdefault n  \t\n']])
+    ]
+

utils/checkpackagelib/test_lib_config.py def test_Indent(testname, filename, string, expected): · line 425

Quoted 10 lines
utils/checkpackagelib/test_lib_config.py +7 -0
+
[email protected]('testname,filename,string,expected', NoDefaultN)
+def test_NoDefaultN(testname, filename, string, expected):
+    warnings = util.check_file(m.NoDefaultN, filename, string)
+    assert warnings == expected
+
+
  RedefinedConfig = [
      ('no redefinition',
       'any',

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Peter Korsgaard
Quoted 5 lines · Peter Korsgaard

Commit a028f0a51de0ed ("package/psplash: add support for fullscreen config option") added a 'default n' line to Config.in, but booleans default to 'n', so we typically do not add such redundant lines.

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Peter Korsgaard
Quoted 5 lines · Peter Korsgaard

Commit a028f0a51de0ed ("package/psplash: add support for fullscreen config option") added a 'default n' line to Config.in, but booleans default to 'n', so we typically do not add such redundant lines.

Applied to 2025.08.x, thanks.

Regards,
Arnout

Quoted 9 lines
---
  package/psplash/Config.in | 1 -
  1 file changed, 1 deletion(-)
package/psplash/Config.in +0 -0
index ca39cd0ee3..118801e8ef 100644

package/psplash/Config.in config BR2_PACKAGE_PSPLASH_STARTUP_MSG · line 54

Quoted 7 lines
package/psplash/Config.in +0 -1
@@ -49,7 +49,6 @@ config BR2_PACKAGE_PSPLASH_STARTUP_MSG
 
  config BR2_PACKAGE_PSPLASH_FULL_SCREEN
  	bool "use fullscreen mode"
-	default n
  	help
  	  Enable displaying the psplash image in fullscreen mode.
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot