[pacman-dev] [PATCH] srcinfo.sh: remove trailing newline

Denton Liu liu.denton at gmail.com
Wed Jun 3 23:26:47 UTC 2020


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

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.
---
 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() {
-- 
2.27.0.rc1.69.g3229fa6e15


More information about the pacman-dev mailing list