From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 03 May 2024 08:59:39 +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 1s2mtP-00GmHJ-1X for lore@lore.pengutronix.de; Fri, 03 May 2024 08:59:39 +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 1s2mtO-0005Rq-PE; Fri, 03 May 2024 08:59:38 +0200 Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2mt3-0005R9-9s for ptxdist@pengutronix.de; Fri, 03 May 2024 08:59:17 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1743E1487C20; Fri, 3 May 2024 08:59:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1714719556; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=4G8hS5LvHsQ61InkFlSIguHlDiRYvULrOLvx+Y/s5hY=; b=NOYIpal3smX5wSp2R0jEW/gWZykThzOCqZ/uBuTEbhj4Oq/t0dif6aP9kIdL+FnUDb7bhk ljn6xR/5NKPKJunLJVMAZyGsyMnjWXTbqqs+uq0ZhJZ+LS7a8U8Ff4yufeAj8tptMCM/kX L6MVzDx+umDuNca52nhmyawQMmk+A2gP6VPK7fYQYpumgPr2gPF4+5jsjxwR4BkUcgmZYI jcG0m+cgQLVj4shUuNpOcf+AP2MolLPTMnUmPt4PFDpEcQqFR+Rff9f5vEooDvCoEqfqLB 8+jOVa6oZBxG6sFz4aTwTwyEm15YT/pHhPCGOrvkun/e//JVAUeA1JtO6Mwn9w== Date: Fri, 3 May 2024 08:59:09 +0200 From: Alexander Dahl To: Ian Abbott Message-ID: <20240503-evade-jumble-3c1c96970cb1@thorsis.com> Mail-Followup-To: Ian Abbott , ptxdist@pengutronix.de References: <20240502145322.141754-1-abbotti@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240502145322.141754-1-abbotti@mev.co.uk> User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 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=-2.9 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH] 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: ptxdist@pengutronix.de 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 Hello Ian, I like the idea. Maybe it confuses users if 'vi' calls busybox and 'vim' the full featured Vim, but I appreciate it anyway. More feedback below. Am Thu, May 02, 2024 at 03:53:22PM +0100 schrieb Ian Abbott: > 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. > > Move the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES > from VIM to VIM_VIM because VIM_XXD does not appear to require them. > > Signed-off-by: Ian Abbott > --- > rules/vim.in | 24 ++++++++++++------------ > rules/vim.make | 4 ++++ > 2 files changed, 16 insertions(+), 12 deletions(-) > > diff --git a/rules/vim.in b/rules/vim.in > index c4c9d14e6..2f7eba993 100644 > --- a/rules/vim.in > +++ b/rules/vim.in > @@ -1,15 +1,7 @@ > ## 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 NCURSES > prompt "vim " > help > Vim is an advanced text editor that seeks to provide the > @@ -18,12 +10,20 @@ menuconfig VIM > > if VIM > > -comment "BusyBox' vi is selected!" > - depends on BUSYBOX_VI > - > config VIM_VIM > - depends on !BUSYBOX_VI > bool "Vim Editor" > + select LIBC_DL > + select LIBC_M > + select GCCLIBS_GCC_S > + select NCURSES Don't move this to the suboption, keep it in the original place but add 'if VIM_VIM' like this: select LIBC_DL if VIM_VIM This avoids dependency problems, it's also in documentation: https://www.ptxdist.org/doc/dev_advanced_rule_files.html#managing-external-compile-time-dependencies-on-demand > + > +comment "BusyBox' vi is selected!" > + depends on VIM_VIM && BUSYBOX_VI > + > +config VIM_VI_SYMLINK > + depends on VIM_VIM && !BUSYBOX_VI The !BUSYBOX_VI is redundant, but I guess one can keep it. Greets Alex > + bool "install symbolic link /usr/bin/vi" > + default y > > comment "BusyBox' xxd is selected!" > depends on BUSYBOX_XXD > 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 > >