Skip to content

Do not consider the arch when filtering the config#691

Merged
imobachgs merged 2 commits intoagama-project:masterfrom
imobachgs:fix-filter-config
Aug 7, 2023
Merged

Do not consider the arch when filtering the config#691
imobachgs merged 2 commits intoagama-project:masterfrom
imobachgs:fix-filter-config

Conversation

@imobachgs
Copy link
Copy Markdown
Contributor

@imobachgs imobachgs commented Aug 7, 2023

Problem

The filter-config.rb script uses Agama::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 a ppc64le machine.

Solution

Load and process the configuration file as plain YAML.

Testing

  • Tested manually

Copy link
Copy Markdown
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@imobachgs imobachgs merged commit 050ed9d into agama-project:master Aug 7, 2023
@imobachgs imobachgs deleted the fix-filter-config branch August 7, 2023 11:13
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
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.

2 participants