[Rpm-maint] [rpm-software-management/rpm] Drop extra newlines from spec parser messages (#1591)

Michal Domonkos notifications at github.com
Mon Mar 29 12:31:34 UTC 2021


> FYI, a PR with failed checks will generally not get much attention. This looks like it just needs some test output updated to the new reality. That case is actually a good argument for the change, the newline(s) make no sense at all.

Yeah, I'll fix that.

> I'm inclined to think the format string should be in charge of the formatting though, rather than content.

Agree, although in this case, we're just making use of the fact that the string already has a newline.

We could keep the `\n`s in the format string, and strip it from the content (line buffer here) instead. However, that would require a `strchr()` as we don't store the line's length anywhere. Alternatively, we could store the length (which we know at the time of parsing, actually). Would that be better?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1591#issuecomment-809338910
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210329/adfe2378/attachment.html>


More information about the Rpm-maint mailing list