Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test commit #1

Closed
wants to merge 9 commits into from
Closed

Test commit #1

wants to merge 9 commits into from

Conversation

dmnks
Copy link
Owner

@dmnks dmnks commented Aug 26, 2022

No description provided.

@dmnks
Copy link
Owner Author

dmnks commented Aug 26, 2022

/packit copr-build

3 similar comments
@dmnks
Copy link
Owner Author

dmnks commented Aug 26, 2022

/packit copr-build

@dmnks
Copy link
Owner Author

dmnks commented Aug 26, 2022

/packit copr-build

@dmnks
Copy link
Owner Author

dmnks commented Aug 26, 2022

/packit copr-build

@dmnks
Copy link
Owner Author

dmnks commented Aug 26, 2022

/packit copr-build

@dmnks dmnks closed this Aug 29, 2022
dmnks added a commit that referenced this pull request Jun 29, 2023
dmnks added a commit that referenced this pull request Jun 29, 2023
dmnks added a commit that referenced this pull request Sep 6, 2024
Confusingly, the "RPM build errors" section also includes messages
logged as warnings.  That gives the false impression that they somehow
contributed to the actual build failure and therefore were turned into
errors.

This appears to be a historical artifact; when a message passes through
the logging system and is of the priority RPMLOG_WARNING or higher, we
save it in a global buffer (ctx->recs), which is then simply dumped with
rpmlogPrint() in the error summary.  This was probably good enough when
the summary was introduced (commit f2efc72, year 2000), as there were
almost no warnings generated by RPM at that time, however as they became
more abundant, the summary code was never revisited.

There are 3 ways to fix this discrepancy:

 1) Change the summary's title to "RPM build problems"
 2) Remove the summary altogether
 3) Don't show warnings in it

Options #1 and #2 would be too disruptive.  The error summary needs to
stay as is, for the following reasons:

 - While it usually just repeats the last error, not all errors
   terminate a build right away, so those can get drown in the output
   that follows after.  Examples: "File not found" in rpmInstall(), or
   macro expansion errors (note: we may have these terminate a build in
   the future).

 - It makes it immediately obvious that something went wrong when
   examining build logs, and the title "RPM build errors" undoubtedly
   has become the de-facto text string to search for.

That leaves us with option #3.  To further lessen the disruption, do
keep a summary of warnings, but put them under their own heading, and
only show it on build failures.  That way, we restrict all the extra
verbosity to error time (as it is now) and don't pollute the output of
otherwise good builds.  There may be packages with long-standing
warnings that are not feasible to fix for any reason, and having an
indented block of text resembling "RPM build errors" at the end of every
build would do no good.

Effectively, this commit is just cosmetic - it splits the error summary
into two, without any functional or API changes (apart from two function
additions).

Fixes: rpm-software-management#793
(cherry picked from commit 7fd7a60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant