Bug 223126

Summary: 'make makepatch' may remove all patches under certain condition
Product: Ports & Packages Reporter: Motomichi Matsuzaki <mzaki>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: New ---    
Severity: Affects Some People CC: mzaki, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
diff for Mk/Scripts/smart_makepatch.sh none

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).