Add missing require clause (bsc#1160362) #1006
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 becauseProductReader
contains a call toY2Packager::ProductControlProduct.products
bit it does not requirey2packager/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:
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.