archlinuxcn / lilac

Lilac is the build bot for archlinuxcn
GNU General Public License v3.0
114 stars 40 forks source link

Should lilac do a clean up after `makepkg -od`? #39

Closed zsrkmyn closed 7 years ago

zsrkmyn commented 7 years ago

I encountered a problem yesterday that the moe lilac sent me a e-mail to remind me the that vim-youcompleteme-git was failed to build AGAIN! The error occured while runing makepkg -od.

I did a research and found it was mainly due to the existing of the old $srcdir generated by last runing of makepkg -od, and a patch was applied twice:

==> 正在开始 prepare()...
  -> Setting up Git submodules...
patching file YouCompleteMe/autoload/youcompleteme.vim
patching file ycmd/default_settings.json
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file ycmd/default_settings.json.rej
==> 错误: 在 prepare() 中发生一个错误。
    正在放弃...

Since the file to be patched is actually in a git submodule, It keeps patched (but not reset to the origin one at the process of extracting sources) at the second time makepkg -od running. The submodule in PKGBUILD is initialized as the wiki says.

I think about some solutions, but don't know which is best:

So, which one is preferable?

lilydjwg commented 7 years ago

-c will clean up after the operation.

I'll try to remove the src directory.