shinchiro/mpv-winbuild-cmake

Incremental build doesn't apply patches cleanly for lame

Closed this issue · 1 comments

Hi,

On incremental build, lame patches does not apply cleanly. First of course without calling update target source dirs are dirty and most patches does not apply, not only for lame, but let's ignore this case for now and assume we always do update first.

(touch CMakeList.txt is only to simulate that something were updated)

touch ../CMakeLists.txt && ninja update && ninja lame

FAILED: ...
patching file frontend/parse.c
patching file doc/html/about.html
patching file doc/html/abr.html
patching file doc/html/cbr.html
patching file doc/html/contact.html
patching file doc/html/contributors.html
patching file doc/html/detailed.html
patching file doc/html/history.html
patching file doc/html/index.html
patching file doc/html/introduction.html
patching file doc/html/links.html
patching file doc/html/list.html
patching file doc/html/ms_stereo.html
patching file doc/html/usage.html
patching file doc/html/vbr.html
patching file libmp3lame/vector/Makefile.am
patching file frontend/get_audio.c
patching file doc/man/lame.1
patching file configure.in
patching file libmp3lame/Makefile.am
The next patch would create the file libmp3lame/mp3lame.pc.in,
which already exists!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored                                                                                                                                                           

As we can see it failed, because during update source tree was reset --hard to remove all changes, but untracked files are still there which trips the patch. There are a few solutions, the easiest would be to also do git clean during update, but overall I feel like incremental builds are little bit fragile.

Perform ninja lame-fullclean should make its clean again nvm, it still doesnt work