Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 635420

Summary: vim-plugin.eclass: vim-plugin_src_install() fails when a hidden directory exists in plugin's root
Product: Gentoo Linux Reporter: Andrew Petelin <adrianopol>
Component: EclassesAssignee: Vim Maintainers <vim>
Status: RESOLVED FIXED    
Severity: normal CC: tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/coreos/portage-stable/blob/master/eclass/vim-plugin.eclass#L46
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Andrew Petelin 2017-10-25 14:05:05 UTC
Building a vim-go plugin [*] fails while executing the vim-plugin_src_install() function from a vim-plugin.eclass script:

> rm: cannot remove '.github': Is a directory
>  * ERROR: app-vim/vim-go-1.15::paq-overlay failed (install phase):
>  *   unwanted files cleanup failed
>  * 
>  * Call stack:
>  *     ebuild.sh, line 115:  Called src_install
>  *   environment, line 213:  Called vim-plugin_src_install
>  *   environment, line 313:  Called die
>  * The specific snippet of code:
>  *       rm -f .[^.] .??* Makefile* || die "unwanted files cleanup failed";

There is a .github directory in the root of the project. Is it meaningful to fix a vim-plugin.eclass file, or should I just remove the directory myself in the src_prepare() phase?

The current vim-go ebuild I've tested (it is the same for version 1.15, just not commited it yet): https://github.com/adrianopol/paq-overlay/blob/master/app-vim/vim-go/vim-go-1.13.ebuild.

--

[*]: https://github.com/fatih/vim-go/tree/v1.15
Comment 1 Andrew Petelin 2017-10-25 14:07:41 UTC
Created attachment 500056 [details]
emerge --info
Comment 2 Andrew Petelin 2017-10-25 14:15:29 UTC
Temporary solution (explicit removal in src_prepare() phase): https://github.com/adrianopol/paq-overlay/blob/master/app-vim/vim-go/vim-go-1.15.ebuild#L19.
Comment 3 Patrice Clement gentoo-dev 2017-10-28 21:35:16 UTC
Thanks Andrew. It is a bug indeed. We must add the -r flag to the the rm command so that directories also get binned.
Comment 4 Larry the Git Cow gentoo-dev 2017-10-28 22:43:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=445304115b838f90801f106420b2f71f8bff33ef

commit 445304115b838f90801f106420b2f71f8bff33ef
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2017-10-28 21:54:25 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2017-10-28 22:42:54 +0000

    vim-plugin.eclass: rework unwanted files and directories cleanup logic.
    
    Courtesy of Arfrever.
    
    Closes: https://bugs.gentoo.org/635420

 eclass/vim-plugin.eclass | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2017-10-29 06:57:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8274919bc4e5d0ec66cb662207bd12433cd9a392

commit 8274919bc4e5d0ec66cb662207bd12433cd9a392
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2017-10-28 22:48:14 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2017-10-29 06:57:29 +0000

    app-vim/vim-go: new package.
    
    vim-go is a Go development plugin for Vim.
    
    Package-Manager: Portage-2.3.8, Repoman-2.3.3
    Bug: https://bugs.gentoo.org/635420

 app-vim/vim-go/Manifest           |  1 +
 app-vim/vim-go/metadata.xml       | 11 +++++++++++
 app-vim/vim-go/vim-go-1.13.ebuild | 22 ++++++++++++++++++++++
 3 files changed, 34 insertions(+)}