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

Add missing require clause (bsc#1160362) #1006

Merged
merged 3 commits into from
Jan 9, 2020

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Jan 8, 2020

See https://bugzilla.suse.com/show_bug.cgi?id=1160362 for details.

Some things have changed in the ProductReader class recently. We don't test the Live Installation (is not a supported scenario), but it looks like it follows a different workflow that ends up with an exception because ProductReader contains a call to Y2Packager::ProductControlProduct.products bit it does not require y2packager/product_control_product.

Likely, in the normal workflow it works by pure luck (because some other class requires y2packager/product_control_product).

This pull request adds the missing require together with a smoke test to prove it was indeed missing.

If fact, the whole situation is even worse at this moment. The current code looks like this:

if Yast::Stage.initial && Y2Packager::MediumType.online? && !force_repos
  return Y2Packager::ProductControlProduct.products.each_with_object([]) {..}
end

Which means that there is another missing "require" for Y2Packager::MediumType. But that's harder to fix and, thus, I'm leaving it out of the scope of this pull request. That class lives in yast2-packager, not in yast2.rpm. To achieve a 100% correct solution, the file (and all its dependencies) should be moved. This is currently not failing (again, by pure luck), so we can ignore the problem for the time being.

@coveralls
Copy link

coveralls commented Jan 8, 2020

Coverage Status

Coverage increased (+0.005%) to 30.016% when pulling 2ed00bb on ancorgs:missing_require into d42204c on yast:master.

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.

LGTM, thanks for the test!

(And yes, that other missing require is not nice... 😟 )

@ancorgs ancorgs merged commit 799e67f into yast:master Jan 9, 2020
@ancorgs ancorgs deleted the missing_require branch January 9, 2020 12:54
@yast-bot
Copy link
Contributor

yast-bot commented Jan 9, 2020

✔️ Public Jenkins job #165 successfully finished
✔️ Created OBS submit request #762184

@lslezak
Copy link
Member

lslezak commented Jan 9, 2020

Thanks!

@yast-bot
Copy link
Contributor

yast-bot commented Jan 9, 2020

✔️ Internal Jenkins job #63 successfully finished
✔️ Created IBS submit request #208999

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