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

Erich Eckner arch at eckner.net
Thu Jun 4 05:00:35 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

On Wed, 3 Jun 2020, Eli Schwartz wrote:

> On 6/3/20 8:04 PM, Eli Schwartz wrote:
>> 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
>
> Also FWIW, I use git diff --check in my pre-commit githook for AUR
> packages, but I also generate the .SRCINFO in that very hook, AFTER I
> check for whitespace issues. Hence I don't see whitespace issues for the
> .SRCINFO file, even for the very first commit. So I'm really not
> motivated to change this.

In case my voice counts anything in this discussion: I would prefer the 
empty lines between the sections and at the end to stay. I regularly parse 
.SRCINFOs (or the output of `makepkg --printsrcinfo`) and terminate 
parsing of sections on the empty line (think along the lines
`sed '/^\S/,/^$/ {...}'`).

>
> For more details see https://github.com/eli-schwartz/aurpublish/#hooks
>
> -- 
> Eli Schwartz
> Bug Wrangler and Trusted User
>

regards,
Erich

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE3p92iMrPBP64GmxZCu7JB1Xae1oFAl7Yf/QACgkQCu7JB1Xa
e1oQuhAArWd0GHhWTk6F4bNS+Vw6PFR7UyJmgUzeipnwBFpXhntUwv4SiygGCaY4
XQFcEByjlhMz6xfL7t2ZfBfxpudH0TlypFdHUV9H2ujgJHi82+1XM13H9R/KMY56
I+YLO5iahPCVu/54licMWiSeb8Vu9ZBOgK5M4bm2YPfcADFaS0FiqZ8bwp3LCe3y
JLiXZ3NOJj4U94OLXA6K1gMUkbn1ZX4TExS+qLGPqLo7W0rPCfZo+FyushNHGjv1
MUUKzDVgXMF06pgN1vCkHWuEmV9HKPibCD1265jbHcgXACzl9qv8wB/AJx21oN6G
UgfzkTxu4LfaoVHsGA0be2vHHcdYYDbQLYJNEVm5DfNj7zeYwp1GFsGIarLz6BQT
FnTpXkni2RFNvVJskDnEAXBsgv0u1Ml5CBJegrPBPhuaFXZ8sk9HVwkb+26DtSQr
/5NyouwErASPDU2kDWnXJ8coJGfqGTmTzAAg1Y2S9/1/uVC9xx9Trya83MBxJ7eF
0bIDWngQNtCuEceEugXtM8W4DqkEFGrWGWiNwX632XhqPmLDuEZBz9HppgNYioHK
ae+rklION7jOCHgu+kHH0DQKwL/V6QViLtL8FYn6M0hHe6ncjxUxta+3FYpmdnTR
Xr98++0JRG9FtWIVOPCGnGU0Qfpig8IJk+dYYv0FNhKvahGn5q4=
=vQdo
-----END PGP SIGNATURE-----


More information about the pacman-dev mailing list