On 6/3/20 7:26 PM, Denton Liu wrote:
When the .SRCINFO file is generated via `makepkg --printsrcinfo`, each section is concluded with an empty line. This means that at the end of the file, an empty line remains. When running `git diff --check`, Git will complain about this as a whitespace error, saying "new blank line at EOF."
git diff --check isn't necessarily our problem, though... But it will only be reported once, the very first time you ever commit this .SRCINFO
Remove the empty line after sections. Replace the empty echo with a placeholder `true` call in case in the future, we do want to close the section with something.
Now you've also removed the blank line in the middle of the file, separating the pkgbase section from each pkgname section. That is more than just the blank line terminating the final pkgname section.
--- scripts/libmakepkg/srcinfo.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/libmakepkg/srcinfo.sh.in b/scripts/libmakepkg/srcinfo.sh.in index 6e783279..e7b5c4be 100644 --- a/scripts/libmakepkg/srcinfo.sh.in +++ b/scripts/libmakepkg/srcinfo.sh.in @@ -31,7 +31,7 @@ srcinfo_open_section() { }
srcinfo_close_section() { - echo + true # nothing to be done }
srcinfo_write_attr() {
-- Eli Schwartz Bug Wrangler and Trusted User