From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 03 May 2024 20:02:58 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s2xFJ-000C9P-1S for lore@lore.pengutronix.de; Fri, 03 May 2024 20:02:58 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s2xFJ-0005hG-3Z; Fri, 03 May 2024 20:02:57 +0200 Received: from smtp106.ord1d.emailsrvr.com ([184.106.54.106]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2xEo-0005fX-CP for ptxdist@pengutronix.de; Fri, 03 May 2024 20:02:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1714759344; bh=4aSyQeg/MflvW6Xh9WXJgj2HW8i6MSphdL7U4T/KKEY=; h=From:To:Subject:Date:From; b=UVRdI90io52FYvfizxKY8hoikl/cweWVKEALfDiAc7Ts/G4HG2kpnSSlpPqBEhzk/ J8RdCLP0XeLlE7A8HZcNKfJ8Al0oPD9bDCwMMiJfwCTBlomJtd6+DFcHDWZFWj/UzH PocFmN5LqUHqXl4Ka8iaoGhJQKBdXIIyFXtywMaw= X-Auth-ID: abbotti@mev.co.uk Received: by smtp6.relay.ord1d.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 648FDE0231; Fri, 3 May 2024 14:02:24 -0400 (EDT) From: Ian Abbott To: ptxdist@pengutronix.de Date: Fri, 3 May 2024 19:01:58 +0100 Message-ID: <20240503180216.636535-1-abbotti@mev.co.uk> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503091453.4906-1-abbotti@mev.co.uk> References: <20240503091453.4906-1-abbotti@mev.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Classification-ID: 38a08cf1-dba5-4013-b95c-2043981d4e8a-1-1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH v3] vim: allow vim to be installed alongside busybox vi and xxd X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Ian Abbott Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Commit ad2eb34a07ed ("vim: prevent file name conflicts with busybox") prevented vim being selected if busybox vi is selected. However, the vim package does not currently install /usr/bin/vi, so the only conflict is between vim's xxd and busybox's xxd. Allow vim to be installed alongside busybox vi. Also add a configuration option to allow installation of a /usr/bin/vi symbolic link to /usr/bin/vim, but only allow it to be selected if busybox vi is not selected. Make the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES depend on VIM_VIM because VIM_XXD does not appear to require them. Signed-off-by: Ian Abbott --- v2: Corrected dependency problem I introduced by moving the auto-selection of the required libraries from VIM to VIM_VIM. I have move them back, but only select them if VIM_VIM is selected, as suggested by Alexander Dahl v3: Applied changes requested by Michael Olbrich. (1) Align the 'if ...' with tabs. [Actually, there is now only one 'if ...' now! -- IA] (2) vim is still compiled even if VIM_VIM is disabled, so leave the NCURSES dependency as is. (3) Remove GCCLIBC_GCC_S and LIBC_DL dependencies as they are no longer used. (4) Add '|| ALLYES' dependency to conditionally built items for better build tests. --- rules/vim.in | 22 ++++++++++------------ rules/vim.make | 4 ++++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/rules/vim.in b/rules/vim.in index c4c9d14e6..d16b54a2d 100644 --- a/rules/vim.in +++ b/rules/vim.in @@ -1,14 +1,8 @@ ## SECTION=editors -comment "BusyBox' vi and xxd is selected!" - depends on BUSYBOX_VI && BUSYBOX_XXD - menuconfig VIM tristate - depends on !(BUSYBOX_VI && BUSYBOX_XXD) - select LIBC_DL - select LIBC_M - select GCCLIBS_GCC_S + select LIBC_M if VIM_VIM select NCURSES prompt "vim " help @@ -18,18 +12,22 @@ menuconfig VIM if VIM -comment "BusyBox' vi is selected!" - depends on BUSYBOX_VI - config VIM_VIM - depends on !BUSYBOX_VI bool "Vim Editor" +comment "BusyBox' vi is selected!" + depends on VIM_VIM && BUSYBOX_VI + +config VIM_VI_SYMLINK + depends on VIM_VIM && !BUSYBOX_VI || ALLYES + bool "install symbolic link /usr/bin/vi" + default y + comment "BusyBox' xxd is selected!" depends on BUSYBOX_XXD config VIM_XXD - depends on !BUSYBOX_XXD + depends on !BUSYBOX_XXD || ALLYES bool "XXD" endif diff --git a/rules/vim.make b/rules/vim.make index b03778e53..8700b70bd 100644 --- a/rules/vim.make +++ b/rules/vim.make @@ -103,6 +103,10 @@ VIM_INSTALL_OPT := \ VIM_LINKS := ex rview rvim view vimdiff +ifdef PTXCONF_VIM_VI_SYMLINK +VIM_LINKS += vi +endif + $(STATEDIR)/vim.targetinstall: @$(call targetinfo) -- 2.43.0