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

Added the Pkg.Resolvables() and Pkg.AnyResolvable() calls #114

Merged
merged 3 commits into from
May 27, 2019

Conversation

lslezak
Copy link
Member

@lslezak lslezak commented May 23, 2019

  • Allow more precise filtering than the old Pkg.ResolvableProperties and Pkg.IsAnyResolvable
    • Accept all attributes for filtering, not only name and kind
    • Set the returned attributes, avoid returning the values which are usually not needed (e.g. package description, license, media location....) - saves a lot of RAM, esp. if you have 40.000 packages from the OSS repo...
  • The old calls are marked as deprecated
  • Added simple smoke test for the new calls
  • 4.2.0

Details

  • I have added a custom libzypp resolvable filter
  • And adapted the shared old call to either return all values (for the old calls) or only the requested attributes (for the new calls)

Note: There is a nice Ruby wrapper for these Pkg calls in Y2Packager::Resolvable class (see yast/yast-packager#442).

**Obsolete**

This call is obsolete, use `Resolvables()` call instead, it has more filtering
options and allows to return only the selected keys (saves memory and time).
Copy link
Member

Choose a reason for hiding this comment

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

do we want to put here deadline for removal? like SLE16?

Copy link
Member Author

Choose a reason for hiding this comment

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

Um, I'm not sure, there are more than 100 calls of these old methods in YaST, it would mean we have to fix it until that time. 😉

Copy link
Member

Choose a reason for hiding this comment

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

or when we get report about out of memory :) It is up to you, but my experience is that with no deadline, no removal will happen :)

// status
std::string stat;
std::string resolvable_summary = item->summary();
if ((all && !resolvable_summary.empty()) || attrs->contains(YCPSymbol("summary")))
Copy link
Member

Choose a reason for hiding this comment

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

this looks a bit inconsistent to me e.g. to epoch, which is written always and here it is filtered if empty.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's for the backward compatibility with the old Pkg.ResolvableProperties call (sets all=true), which tries to save memory some by omitting some empty values.

For the new call it is added only if it is required (symbol included in the list) regardless the actual value.

I didn't want to change the behavior of the old call, some code depends on that behavior.

@lslezak lslezak merged commit 69151b9 into master May 27, 2019
@lslezak lslezak deleted the resolvables_api branch May 27, 2019 07:27
@yast-bot
Copy link
Contributor

❌ Public Jenkins job #13 failed

@yast-bot
Copy link
Contributor

❌ Public Jenkins job #14 failed

@yast-bot
Copy link
Contributor

❌ Public Jenkins job #15 failed

@lslezak
Copy link
Member Author

lslezak commented May 27, 2019

✔️ Um, the Jenkins has some network problems with OBS, submitted manually in SR#705577.

@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #16 successfully finished
✔️ Created OBS submit request #706661

@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #1 successfully finished
✔️ Created IBS submit request #195487

@lslezak lslezak mentioned this pull request Oct 14, 2019
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