Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2] vim: be more careful when removing the documentation
@ 2016-12-05 20:36 Thomas Petazzoni
  2016-12-05 21:46 ` Arnout Vandecappelle
  2016-12-05 22:04 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2016-12-05 20:36 UTC (permalink / raw)
  To: buildroot

The current VIM_REMOVE_DOCS hook removes all .txt files from
/usr/share/vim. Unfortunately, this also removes the rgb.txt file,
which is needed at runtime for vim, as reported in bug #9466.

This commit changes VIM_REMOVE_DOCS to remove only
/usr/share/vim/vim80/doc/. Size-wise, it's equivalent because:

 - We are no longer removing a few README.txt in other directories,
   taking more space.

 - We are now removing the /usr/share/vim/vim*/doc/ folder entirely,
   which contained a few files not named *.txt

So overall, the size of /usr/share/vim/ before and after this patch is
still 11MB.

Fixes bug #9466.

Reported-by: Mateusz Furdyna <sir.ferdek@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Changes since v1:

 - Remove /usr/share/vim/vim*/doc/ instead of
   /usr/share/vim/vim80/doc/ in order to make the code compatible with
   upcoming bumps to the vim version. Suggested by Mateusz Furdyna.
---
 package/vim/vim.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/vim/vim.mk b/package/vim/vim.mk
index d4a1f82..308855e 100644
--- a/package/vim/vim.mk
+++ b/package/vim/vim.mk
@@ -61,7 +61,7 @@ define VIM_INSTALL_RUNTIME_CMDS
 endef
 
 define VIM_REMOVE_DOCS
-	find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
+	$(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc/
 endef
 
 # Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCHv2] vim: be more careful when removing the documentation
  2016-12-05 20:36 [Buildroot] [PATCHv2] vim: be more careful when removing the documentation Thomas Petazzoni
@ 2016-12-05 21:46 ` Arnout Vandecappelle
  2016-12-05 22:04 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2016-12-05 21:46 UTC (permalink / raw)
  To: buildroot



On 05-12-16 21:36, Thomas Petazzoni wrote:
> The current VIM_REMOVE_DOCS hook removes all .txt files from
> /usr/share/vim. Unfortunately, this also removes the rgb.txt file,
> which is needed at runtime for vim, as reported in bug #9466.
> 
> This commit changes VIM_REMOVE_DOCS to remove only
> /usr/share/vim/vim80/doc/. Size-wise, it's equivalent because:
> 
>  - We are no longer removing a few README.txt in other directories,
>    taking more space.

 To keep things the same, we *could* still find README*.txt (instead of *.txt)
in addition to removing the doc directory. But that just makes 32K difference
(over 11MB) so not really worth it. So

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

>  - We are now removing the /usr/share/vim/vim*/doc/ folder entirely,
>    which contained a few files not named *.txt
> 
> So overall, the size of /usr/share/vim/ before and after this patch is
> still 11MB.
> 
> Fixes bug #9466.
> 
> Reported-by: Mateusz Furdyna <sir.ferdek@gmail.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Changes since v1:
> 
>  - Remove /usr/share/vim/vim*/doc/ instead of
>    /usr/share/vim/vim80/doc/ in order to make the code compatible with
>    upcoming bumps to the vim version. Suggested by Mateusz Furdyna.
> ---
>  package/vim/vim.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/vim/vim.mk b/package/vim/vim.mk
> index d4a1f82..308855e 100644
> --- a/package/vim/vim.mk
> +++ b/package/vim/vim.mk
> @@ -61,7 +61,7 @@ define VIM_INSTALL_RUNTIME_CMDS
>  endef
>  
>  define VIM_REMOVE_DOCS
> -	find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
> +	$(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc/
>  endef
>  
>  # Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCHv2] vim: be more careful when removing the documentation
  2016-12-05 20:36 [Buildroot] [PATCHv2] vim: be more careful when removing the documentation Thomas Petazzoni
  2016-12-05 21:46 ` Arnout Vandecappelle
@ 2016-12-05 22:04 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2016-12-05 22:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  5 Dec 2016 21:36:32 +0100, Thomas Petazzoni wrote:
> The current VIM_REMOVE_DOCS hook removes all .txt files from
> /usr/share/vim. Unfortunately, this also removes the rgb.txt file,
> which is needed at runtime for vim, as reported in bug #9466.
> 
> This commit changes VIM_REMOVE_DOCS to remove only
> /usr/share/vim/vim80/doc/. Size-wise, it's equivalent because:
> 
>  - We are no longer removing a few README.txt in other directories,
>    taking more space.
> 
>  - We are now removing the /usr/share/vim/vim*/doc/ folder entirely,
>    which contained a few files not named *.txt
> 
> So overall, the size of /usr/share/vim/ before and after this patch is
> still 11MB.
> 
> Fixes bug #9466.
> 
> Reported-by: Mateusz Furdyna <sir.ferdek@gmail.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Changes since v1:

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-05 22:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 20:36 [Buildroot] [PATCHv2] vim: be more careful when removing the documentation Thomas Petazzoni
2016-12-05 21:46 ` Arnout Vandecappelle
2016-12-05 22:04 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox