diff mbox series

[2/2] package/util-linux: adding cfdisk enablement comment

Message ID CYYP221MB114065AD82DF8DF273CA6105A04C2@CYYP221MB1140.NAMP221.PROD.OUTLOOK.COM
State New
Headers show
Series [1/2] package/util-linux: explicit slang dependency fallback for cfdisk | expand

Commit Message

James Knight Feb. 16, 2024, 5:57 a.m. UTC
This commit introduces a menu comment to users to indicate whether the
`cfdisk` can be built, even when the basic set binaries option is
enabled.

For users wishing to support `fdisks` utilities (cfdisk, fdisk and
sfdisk) in Buildroot, these utilities are enabled through a
`BR2_PACKAGE_UTIL_LINUX_BINARIES` option. This option configures
`all-programs`, which will default enable `fdisks` (along with other
program options that do not have an explicit configuration). While a
user can enable "all programs", there is no guarantee that the `cfdisk`
utility will be built if neither ncurses or slang is enabled. Even if
an explicit Buildroot menu option is added for `cfdisk` (where we can
force select ncurses, if slang is not yet enabled), there is no specific
configuration option in util-linux to toggle the enablement of `cfdisk`
at this time.

Signed-off-by: James Knight <james.d.knight@live.com>
---
 package/util-linux/Config.in | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 73fa11380e82fb42da170045e1c03cc3a5783637..e59072f039bf780df768bfa7e0d66fbb13ab743c 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -67,6 +67,14 @@  config BR2_PACKAGE_UTIL_LINUX_BINARIES
 	  The setarch utility also installs architecture-specific
 	  symlinks like linux32, linux64, uname26, i386 and x86_64.
 
+if BR2_PACKAGE_UTIL_LINUX_BINARIES
+
+comment "cfdisk needs either ncurses or slang"
+	depends on !BR2_PACKAGE_NCURSES
+	depends on !BR2_PACKAGE_SLANG
+
+endif
+
 config BR2_PACKAGE_UTIL_LINUX_AGETTY
 	bool "agetty"
 	depends on BR2_USE_MMU # fork()