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

feat: implement some libzypp error callbacks #1932

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Jan 22, 2025

Problem

Agama only implements a few libzypp error callbacks, so many times it does not report problems
properly.

Solution

Implement more libzypp error callbacks, reporting more types of problems.

  • DoneProvide
  • SourceProbeError
  • SourceCreateError
  • ScriptProblem

Testing

  • Added a new unit test

Future

  • AcceptUnknownGpgKey
  • AcceptVerificationFailed
  • AcceptFileWithoutChecksum
  • AcceptWrongDigest
  • AcceptUnknownDigest

@imobachgs imobachgs force-pushed the libzypp-errors branch 4 times, most recently from 70bf317 to 01b344f Compare January 22, 2025 12:58
@imobachgs imobachgs marked this pull request as ready for review January 22, 2025 13:02
@coveralls
Copy link

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 12908783837

Details

  • 94 of 103 (91.26%) changed or added relevant lines in 6 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 71.037%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/agama/software/callbacks/provide.rb 31 32 96.88%
service/lib/agama/software/callbacks/script.rb 21 22 95.45%
service/lib/agama/software/callbacks/source.rb 34 41 82.93%
Files with Coverage Reduction New Missed Lines %
service/lib/agama/software/callbacks/progress.rb 1 90.48%
service/service/lib/agama/software/callbacks/progress.rb 2 90.48%
Totals Coverage Status
Change from base Build 12894451227: 0.2%
Covered Lines: 17426
Relevant Lines: 24531

💛 - Coveralls


# DoneProvide callback
#
# @return [String] "I" for ignore, "R" for retry and "C" for abort (not implemented)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP: I think it would be better to use constants like IGNORE and RETRY in code instead of C or I.

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.

3 participants