From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/16] package: install bash-completion files only with bash
Date: Mon, 26 Jan 2015 23:00:31 +0100 [thread overview]
Message-ID: <20150126230031.7b1d0c97@free-electrons.com> (raw)
In-Reply-To: <1421684056-5266-3-git-send-email-maxtram95@gmail.com>
Dear Maxim Mikityanskiy,
On Mon, 19 Jan 2015 18:14:02 +0200, Maxim Mikityanskiy wrote:
> package/systemd, package/kmod, package/util-linux: don't install
> bash-completion files if bash is not selected to be installed.
> Otherwise, install bash-completion files.
>
> package/systemd: don't install zsh-completion files is zsh is not
> selected to be installed. Otherwise, install zsh-completion files.
>
> package/util-linux: don't install empty
> /usr/share/bash-completion/completions directory if bash is not going to
> be installed, and install bash-completion files if bash is selected to
> be installed.
>
> Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Thanks, applied.
However, long term I wonder if we shouldn't think of a more centralized
and radical solution. In package/bash/bash.mk:
ifeq ($(BR2_PACKAGE_BASH),)
define BASH_REMOVE_COMPLETION_FILES
$(RM) -rf $(TARGET_DIR)/usr/share/bash-completion/
endef
TARGET_FINALIZE_HOOKS += BASH_REMOVE_COMPLETION_FILES
endif
This way, as long as bash is not enabled, all bash completion files are
removed. We could do the same with zsh.
The only trick here is that such a solution relies on
package/bash/bash.mk being included/parsed unconditionally. This is
currently the case today: regardless of whether a package is enabled or
not, its .mk file is always included/parsed. But at some point in the
past, we have been talking on changing this, in order to speed up the
parsing time of all the .mk files, which linearly increases with the
number of packages we add in Buildroot. But oh well, if we ever want to
do that, we can always change the way to handle the bash completion
thing, and other similar target finalization stuff that needs to be
done if a package is *not* installed.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-01-26 22:00 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 16:14 [Buildroot] [PATCH 00/16] Different enhancements, primarily for systemd Maxim Mikityanskiy
2015-01-19 16:14 ` [Buildroot] [PATCH 01/16] package/busybox: optional udhcpc script Maxim Mikityanskiy
2015-01-26 21:26 ` Thomas Petazzoni
2015-01-26 22:06 ` Peter Korsgaard
2015-01-19 16:14 ` [Buildroot] [PATCH 02/16] package: install bash-completion files only with bash Maxim Mikityanskiy
2015-01-26 22:00 ` Thomas Petazzoni [this message]
2015-01-19 16:14 ` [Buildroot] [PATCH 03/16] package/dbus: fix machine-id when using systemd Maxim Mikityanskiy
2015-02-02 14:50 ` Samuel Martin
2015-02-02 15:18 ` Maxim Mikityanskiy
2015-07-12 23:48 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 04/16] package/systemd: add missing dependencies Maxim Mikityanskiy
2015-02-02 14:22 ` Samuel Martin
2015-07-12 22:27 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 05/16] package/systemd: apply locale settings in user shells Maxim Mikityanskiy
2015-02-02 15:20 ` Samuel Martin
2015-02-02 15:28 ` Maxim Mikityanskiy
2015-07-12 22:55 ` [Buildroot] [PATCH v2] skeleton: " Arnout Vandecappelle
2015-07-13 20:36 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 06/16] package/dosfstools: add missing symlinks Maxim Mikityanskiy
2015-02-02 16:22 ` Samuel Martin
2015-03-08 22:04 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 07/16] package/dropbear: install dropbear.service to correct dir Maxim Mikityanskiy
2015-02-02 20:41 ` Samuel Martin
2015-02-23 11:38 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 08/16] package/e2fsprogs: make /sbin/fsck available Maxim Mikityanskiy
2015-02-02 20:44 ` Samuel Martin
2015-07-10 17:35 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 09/16] package/minidlna: improve systemd support Maxim Mikityanskiy
2015-02-02 21:12 ` Samuel Martin
2015-02-02 21:30 ` Maxim Mikityanskiy
2015-02-02 23:22 ` Samuel Martin
2015-02-03 9:10 ` Arnout Vandecappelle
2015-03-08 21:52 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 10/16] package/transmission: " Maxim Mikityanskiy
2015-02-02 22:09 ` Samuel Martin
2015-02-03 9:11 ` Arnout Vandecappelle
2015-07-14 13:51 ` [Buildroot] [PATCHv2] transmission: " Aurélien Chabot
2015-07-14 14:05 ` Maxime Hadjinlian
2015-07-16 21:27 ` Aurélien Chabot
2015-07-18 15:20 ` Maxime Hadjinlian
2015-07-19 22:18 ` [Buildroot] [PATCH v3] " Aurélien Chabot
2015-07-26 21:38 ` Maxime Hadjinlian
2015-07-27 21:56 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 11/16] package/samba: use FHS dirs Maxim Mikityanskiy
2015-02-02 22:49 ` Samuel Martin
2015-04-06 9:45 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 12/16] package/samba: add systemd support Maxim Mikityanskiy
2015-02-02 22:38 ` Samuel Martin
2015-07-13 20:47 ` Maxime Hadjinlian
2015-01-19 16:14 ` [Buildroot] [PATCH 13/16] package/tar: add support for acl and xattr Maxim Mikityanskiy
2015-02-02 8:26 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 14/16] package/util-linux: add more tool select options Maxim Mikityanskiy
2015-01-26 22:11 ` Thomas Petazzoni
2015-02-07 22:00 ` Yann E. MORIN
2015-01-19 16:14 ` [Buildroot] [PATCH 15/16] package/vim: add default vimrc Maxim Mikityanskiy
2015-02-02 23:00 ` Samuel Martin
2015-07-10 18:24 ` Thomas Petazzoni
2015-01-19 16:14 ` [Buildroot] [PATCH 16/16] package/rng-tools: add systemd support for rngd Maxim Mikityanskiy
2015-02-02 17:12 ` Samuel Martin
2015-04-22 20:10 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150126230031.7b1d0c97@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox