6819d5d636
There were two issues with the new smart_makepatch script. 1) use of "local" declaration All function variables were declared "local" during the review. This caused the script to break, at least on FreeBSD 9.2. Given that it's not being seen on 9.3R or later, it might be a bug in Bourne shell that has since been fixed. e.g. This resulted in stderr error on second iteration: local contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}') however, this works fine: local contains contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}') To be safe, all local variables are assigned with $(<shell cmd>) on separate lines now. 2) The comment extraction was flawed for files that contain multiple patches. It was not counting the hunk lines properly which caused some portion of a patch to be considered as a comment for the next patch. The hunk traversal algorithm has been fixed. Since 1) involved the introduction of local declarations that broke the script and since only Scripts/smart_makepatch.sh is touched, I will piggy-back on the original approval. The fix was tested with devel/nspr, the port listed in the PR, which uses multi-patch files. Approved by: portmgr Differential Revision: D4136 PR: 204725 |
||
---|---|---|
.. | ||
actual-package-depends.sh | ||
check-stagedir.sh | ||
check_leftovers.sh | ||
depends-list.sh | ||
dialog4ports.sh | ||
do-depends.sh | ||
find-lib.sh | ||
functions.sh | ||
generate-symbols.sh | ||
plist_sub_sed_sort.sh | ||
ports_env.sh | ||
qa.sh | ||
security-check.awk | ||
smart_makepatch.sh |