Skip to content

drop unused reports (see https://github.com/openSUSE/libzypp/pull/610)#191

Merged
jreidinger merged 3 commits intomasterfrom
drop_unused_report
Feb 3, 2025
Merged

drop unused reports (see https://github.com/openSUSE/libzypp/pull/610)#191
jreidinger merged 3 commits intomasterfrom
drop_unused_report

Conversation

@jreidinger
Copy link
Member

Problem

Libzypp has bunch of unused reports and pkg-bindings still use it.

openSUSE/libzypp#610

Solution

make them noop and mark as deprecated.

@jreidinger jreidinger force-pushed the drop_unused_report branch 2 times, most recently from c2b1b9b to a087997 Compare January 31, 2025 16:16
Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

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

Please add logging so we can find the callers and update them.

YCPValue PkgFunctions::CallbackSourceCreateStart( const YCPValue& args)
{
return SET_YCP_CB( CB_SourceCreateStart, args);
return YCPVoid();
Copy link
Member

Choose a reason for hiding this comment

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

I'd add some logging to easily find the obsolete calls in the Ruby code:

ycpmilestone("Pkg::CallbackSourceCreateStart is obsolete and does nothing, remove it");

This logs the Ruby place where it was called from.

(Needs #include <ycp/y2log.h> at the top.)

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like there is already #include "log.h" which should include y2util/y2log which hopefully should be enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm, it defined y2milestone and not ycpmilestone. Let me check if there is difference between them.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, there is different y2milestone report file nad location when it is called. ycpmilestone will use yast info about location, so probably the right ruby location. So lets add that header.

@jreidinger jreidinger marked this pull request as ready for review January 31, 2025 20:19
@jreidinger jreidinger merged commit 05457da into master Feb 3, 2025
2 checks passed
@jreidinger jreidinger deleted the drop_unused_report branch February 3, 2025 09:32
@github-actions
Copy link

github-actions bot commented Feb 3, 2025

✅ Autosubmission job #13110415173 successfully finished
✅ Created submit request #1242488

imobachgs added a commit to agama-project/agama that referenced this pull request Feb 7, 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.

- [x] DoneProvide
- ~~SourceProbeError~~ - not used
- ~~SourceCreateError~~ - not used
- [x] ScriptProblem
- [x] 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](https://github.com/user-attachments/assets/ceb9bbe5-72a1-437c-8061-9dc199f151d9)
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.

2 participants