Fix Build Failure: New libstorage-ng enum #1367
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.
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1219804
Problem
Build failure with latest libstorage-ng:
Cause
libstorage-ng now has support for bcachefs, including a new enum value
BCACHEFS
.We have a unit test to check if all values of this C++ libstorage-ng enum for storage features are covered on the Ruby side in yast-storage-ng in this map:
https://github.com/yast/yast-storage-ng/blob/master/src/lib/y2storage/storage_feature.rb#L55-L102
The map contains support packages for each storage feature; packages that need to be installed when the feature is used.
Fix
Added a map entry for this new enum value.
What Support Packages are Needed?
Right now none since there is no support for bcachefs in yast-storage-ng for the time being. libstorage may detect it during storage probing, but we will not propose it, and the expert partitioner does not support adding it.
Future Support Packages
There is package bcachefs-tools which will be needed when this is implemented on the Ruby side (in yast-storage-ng), too.
https://build.opensuse.org/package/show/openSUSE:Factory/bcache-tools
Add this Immediately?
No, this might lead to unrecoverable situations if a bcachefs is detected during storage probing, so that package would be requested from the libzypp pool, but it might not be available for the current product.
We would have to add it to
OPTIONAL_PACKAGES
as well for the time being, but it might be left over there when the feature is implemented, leading to more obscure problems.https://github.com/yast/yast-storage-ng/blob/master/src/lib/y2storage/storage_feature.rb#L112
For now, it's just in a comment as a reminder to add it in the future.
Related PR
Backport to SLE-15-SP6: PR #1371