busybox: preserve ncurses progs/tools
authorMatt Weber <matthew.weber@rockwellcollins.com>
Fri, 14 Apr 2017 03:20:47 +0000 (22:20 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 14 Apr 2017 08:56:08 +0000 (10:56 +0200)
The ncurses package installs a full version of clear and reset(tset)
tools.  Preserve these by disabling the options in the busybox config
file.  This removes the need for ncurses to depend on busybox for solely
ordering of target install.

This commit resolves the following python circular dependency with python.
busybox -> libselinux -> python3 -> ncurses -> busybox

Fixes:
http://autobuild.buildroot.net/results/db1/db1e6f3054092fc5576ccab8e04a3b9d74ca9a8c/

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
[Thomas: minor tweaks.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/busybox/busybox.mk
package/ncurses/ncurses.mk

index f9dacc70add52d816d0118af1f33440895803b1f..9d9fcc24d16e8a4dcfac3758bb852d249d3be750 100644 (file)
@@ -148,6 +148,17 @@ define BUSYBOX_MUSL_TWEAKS
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y)
+# Ncurses package overlaps:
+#     /usr/bin/clear
+#     /usr/bin/reset -> /usr/bin/tset (symlink)
+#
+define BUSYBOX_DISABLE_NCURSES_PROGS
+       $(call KCONFIG_DISABLE_OPT,CONFIG_CLEAR,$(BUSYBOX_BUILD_CONFIG))
+       $(call KCONFIG_DISABLE_OPT,CONFIG_RESET,$(BUSYBOX_BUILD_CONFIG))
+endef
+endif
+
 define BUSYBOX_INSTALL_UDHCPC_SCRIPT
        if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
                $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
@@ -229,6 +240,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
        $(BUSYBOX_SET_WATCHDOG)
        $(BUSYBOX_SET_SELINUX)
        $(BUSYBOX_MUSL_TWEAKS)
+       $(BUSYBOX_DISABLE_NCURSES_PROGS)
 endef
 
 define BUSYBOX_CONFIGURE_CMDS
index 68c77ac61f334a0ae12cf319c74a82464ff88fc7..2b99d3f5388862f771312f640d53ed06ce71f42a 100644 (file)
@@ -29,11 +29,6 @@ NCURSES_CONF_OPTS = \
        $(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \
        --without-manpages
 
-# Install after busybox for the full-blown versions
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-NCURSES_DEPENDENCIES += busybox
-endif
-
 ifeq ($(BR2_STATIC_LIBS),y)
 NCURSES_CONF_OPTS += --without-shared --with-normal
 else ifeq ($(BR2_SHARED_LIBS),y)