Skip to content

Add libzypp callbacks#369

Merged
imobachgs merged 18 commits intomasterfrom
add-software-callbacks
Dec 15, 2022
Merged

Add libzypp callbacks#369
imobachgs merged 18 commits intomasterfrom
add-software-callbacks

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Dec 14, 2022

Problem

When something goes wrong during packages installation, the user is not informed.

Solution

Implement a few libzypp callbacks to inform the user about potential problems.

Testing

  • Added a new unit test
  • Tested manually

To do

  • Implement AcceptUnsignedFile (needed for testing)
  • Implement MediaChange (to detect whether a package is not in the repository anymore)

@imobachgs imobachgs force-pushed the add-software-callbacks branch from 6238c82 to ec18d63 Compare December 14, 2022 16:28
@imobachgs imobachgs force-pushed the add-software-callbacks branch 5 times, most recently from 3e6e3b4 to 3c4c6c9 Compare December 14, 2022 22:34
@imobachgs imobachgs changed the title [WIP] Add libzypp callbacks Add libzypp callbacks Dec 14, 2022
@imobachgs imobachgs marked this pull request as ready for review December 14, 2022 22:40
@imobachgs imobachgs force-pushed the add-software-callbacks branch 2 times, most recently from d3dbf90 to 88f56c0 Compare December 14, 2022 22:48
@imobachgs imobachgs force-pushed the add-software-callbacks branch from 88f56c0 to 57532d0 Compare December 14, 2022 22:57
@coveralls
Copy link

coveralls commented Dec 15, 2022

Coverage Status

Coverage increased (+0.5%) to 76.111% when pulling 81100a2 on add-software-callbacks into 2c3c106 on master.

* It might happen that we skip a package installation. In that case,
  the progress is not updated. By now, let's just force to finish the
  progress.
@imobachgs imobachgs force-pushed the add-software-callbacks branch from b2bd836 to 2c77cd0 Compare December 15, 2022 10:11
Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor comment.

Copy link
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

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

LGTM

error, options: [:Retry, :Skip], default_option: :Retry
)
ask(question) do |q|
logger.info "#{q.text}: #{q.answer}"
Copy link
Contributor

Choose a reason for hiding this comment

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

NP: Maybe #ask should always log this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. I will make a note to change that in another PR (we do the same in the storage callbacks).

@imobachgs imobachgs merged commit 91dc744 into master Dec 15, 2022
@imobachgs imobachgs deleted the add-software-callbacks branch December 15, 2022 11:52
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.

4 participants