Do not consider the arch when filtering the config #691
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.
Problem
The
filter-config.rb
script usesAgama::Config
to load the configuration before filtering for the wanted products. The problem is that such a class filters out the unsupported architectures, which causes the script to render different configuration files depending on the arch where it runs.What is worse, when a product is unavailable for a given architecture, it causes the script to fail. For instance, as Leap16 is not supported in
ppc64le
, the following invocation fails:filter-config.rb /etc/agama.yaml Tumbleweed Leap16
The desired result should be the YAML file containing TW and Leap16 products. Agama will filter
Leap16
when running on appc64le
machine.Solution
Load and process the configuration file as plain YAML.
Testing