From 198b3b31c0d9150250bedfde2599ee05af5ddea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 10 Mar 2026 14:06:12 +0000 Subject: [PATCH 1/2] Do not consider empty AutoYaST values --- service/lib/agama/autoyast/profile_checker.rb | 9 ++++++++- service/test/agama/autoyast/profile_checker_test.rb | 12 +++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/service/lib/agama/autoyast/profile_checker.rb b/service/lib/agama/autoyast/profile_checker.rb index 867f5e4950..34c6e88f5a 100644 --- a/service/lib/agama/autoyast/profile_checker.rb +++ b/service/lib/agama/autoyast/profile_checker.rb @@ -51,6 +51,8 @@ def elements_from(profile, parent = "") return [] unless profile.is_a?(Hash) profile.map do |k, v| + next if empty?(v) + current = parent.empty? ? k : "#{parent}#{ProfileDescription::SEPARATOR}#{k}" children = if v.is_a?(Array) @@ -62,7 +64,12 @@ def elements_from(profile, parent = "") end [current, *children] - end.flatten + end.flatten.compact + end + + # Determine whether the given value is empty. + def empty?(value) + value.nil? || (value.respond_to?(:empty?) && value.empty?) end end end diff --git a/service/test/agama/autoyast/profile_checker_test.rb b/service/test/agama/autoyast/profile_checker_test.rb index 703515afa4..7e2e272b51 100644 --- a/service/test/agama/autoyast/profile_checker_test.rb +++ b/service/test/agama/autoyast/profile_checker_test.rb @@ -34,11 +34,21 @@ end end - context "when an unsupported section is included" do + context "when an unsupported section with empty value is included" do let(:profile) do { "auth-client" => {} } end + it "ignores the unsupported element" do + expect(subject.find_unsupported(profile)).to eq([]) + end + end + + context "when an unsupported section is included" do + let(:profile) do + { "auth-client" => { "some" => "value" } } + end + it "returns an array with the unsupported element" do expect(subject.find_unsupported(profile)).to contain_exactly( an_object_having_attributes(key: "auth-client") From 26128e092f87dbce799f1e6edd1e1db3365135b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 10 Mar 2026 14:11:04 +0000 Subject: [PATCH 2/2] Update changes file --- service/package/rubygem-agama-yast.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/package/rubygem-agama-yast.changes b/service/package/rubygem-agama-yast.changes index bff2d79d08..262ce65a5c 100644 --- a/service/package/rubygem-agama-yast.changes +++ b/service/package/rubygem-agama-yast.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 10 14:10:18 UTC 2026 - Imobach Gonzalez Sosa + +- Do not report AutoYaST elements as unsupported if the value is empty + (bsc#1259458). + ------------------------------------------------------------------- Tue Feb 24 16:59:38 UTC 2026 - Ladislav Slezák