Skip to content

feat: implement some libzypp error callbacks#1932

Merged
imobachgs merged 16 commits intomasterfrom
libzypp-errors
Feb 7, 2025
Merged

feat: implement some libzypp error callbacks#1932
imobachgs merged 16 commits intomasterfrom
libzypp-errors

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 - not used
  • SourceCreateError - not used
  • ScriptProblem
  • DonePackage

for not used see yast/yast-pkg-bindings#191

Testing

  • Tested manually, testing the package installation failure was a bit tricky. I used dd if=/dev/zero of=/mnt/eat-space to eat all available space. But you need to leave enough space for download and not enough to install the package.

Future

  • AcceptUnknownGpgKey
  • AcceptVerificationFailed
  • AcceptFileWithoutChecksum
  • AcceptWrongDigest
  • AcceptUnknownDigest

Screenshots

agama-package-callbacks

@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 13203950149

Details

  • 17 of 18 (94.44%) changed or added relevant lines in 4 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 70.9%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/agama/software/callbacks/progress.rb 9 10 90.0%
Files with Coverage Reduction New Missed Lines %
service/lib/agama/software/callbacks/progress.rb 1 91.3%
rust/agama-server/tests/common/mod.rs 5 74.19%
Totals Coverage Status
Change from base Build 13203827354: -0.02%
Covered Lines: 17301
Relevant Lines: 24402

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

@imobachgs imobachgs merged commit 2611e0e into master Feb 7, 2025
11 checks passed
@imobachgs imobachgs deleted the libzypp-errors branch February 7, 2025 16:59
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 2025
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.

5 participants