Bug 223126 - 'make makepatch' may remove all patches under certain condition
Summary: 'make makepatch' may remove all patches under certain condition
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
Depends on:
Reported: 2017-10-20 09:50 UTC by Motomichi Matsuzaki
Modified: 2017-10-20 09:50 UTC (History)
2 users (show)

See Also:

diff for Mk/Scripts/smart_makepatch.sh (476 bytes, patch)
2017-10-20 09:50 UTC, Motomichi Matsuzaki
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Motomichi Matsuzaki 2017-10-20 09:50:44 UTC
Created attachment 187325 [details]
diff for Mk/Scripts/smart_makepatch.sh

In the case that file(s) with name beginning with '-' exists in ${PATCH_WRKSRC},
'make makepatch' removes all existing patches in ${PATCHDIR} rather than
regenerating them.

This is caused by 'find -s * -type f...' in regenerate_patches() in Mk/Scripts/smart_makepatch.sh
The glob expanded to (for example) '-m Makefile ...' causes 'find' an illegal option error, making new_list null.

Suggested workaround is adding -f before * (patch attached).