Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-online-update-configuration
for openSUSE:Factory checked in at 2022-05-30 12:42:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-online-update-configuration (Old)
and
/work/SRC/openSUSE:Factory/.yast2-online-update-configuration.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-online-update-configuration"
Mon May 30 12:42:43 2022 rev:33 rq:979486 version:4.5.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/yast2-online-update-configuration/yast2-online-update-configuration.changes
2022-04-14 17:25:04.699236239 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-online-update-configuration.new.2254/yast2-online-update-configuration.changes
2022-05-30 12:43:20.840342374 +0200
@@ -1,0 +2,7 @@
+Thu May 26 06:42:47 UTC 2022 - Imobach Gonzalez Sosa <[email protected]>
+
+- Reduce nesting in the "category_filter" section of the AutoYaST
+ profile (bsc#1198848). The old (nested) format is still accepted.
+- 4.5.1
+
+-------------------------------------------------------------------
Old:
----
yast2-online-update-configuration-4.5.0.tar.bz2
New:
----
yast2-online-update-configuration-4.5.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-online-update-configuration.spec ++++++
--- /var/tmp/diff_new_pack.7JXydS/_old 2022-05-30 12:43:21.424343152 +0200
+++ /var/tmp/diff_new_pack.7JXydS/_new 2022-05-30 12:43:21.428343157 +0200
@@ -17,7 +17,7 @@
Name: yast2-online-update-configuration
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Summary: Configuration of Online Update
License: GPL-2.0-only
++++++ yast2-online-update-configuration-4.5.0.tar.bz2 ->
yast2-online-update-configuration-4.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-online-update-configuration-4.5.0/package/yast2-online-update-configuration.changes
new/yast2-online-update-configuration-4.5.1/package/yast2-online-update-configuration.changes
---
old/yast2-online-update-configuration-4.5.0/package/yast2-online-update-configuration.changes
2022-04-12 13:36:19.000000000 +0200
+++
new/yast2-online-update-configuration-4.5.1/package/yast2-online-update-configuration.changes
2022-05-27 15:49:00.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 26 06:42:47 UTC 2022 - Imobach Gonzalez Sosa <[email protected]>
+
+- Reduce nesting in the "category_filter" section of the AutoYaST
+ profile (bsc#1198848). The old (nested) format is still accepted.
+- 4.5.1
+
+-------------------------------------------------------------------
Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
- Bump version to 4.5.0 (bsc#1198109)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-online-update-configuration-4.5.0/package/yast2-online-update-configuration.spec
new/yast2-online-update-configuration-4.5.1/package/yast2-online-update-configuration.spec
---
old/yast2-online-update-configuration-4.5.0/package/yast2-online-update-configuration.spec
2022-04-12 13:36:19.000000000 +0200
+++
new/yast2-online-update-configuration-4.5.1/package/yast2-online-update-configuration.spec
2022-05-27 15:49:00.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-online-update-configuration
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Group: System/YaST
License: GPL-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-online-update-configuration-4.5.0/src/autoyast-rnc/online_update_configuration.rnc
new/yast2-online-update-configuration-4.5.1/src/autoyast-rnc/online_update_configuration.rnc
---
old/yast2-online-update-configuration-4.5.0/src/autoyast-rnc/online_update_configuration.rnc
2022-04-12 13:36:19.000000000 +0200
+++
new/yast2-online-update-configuration-4.5.1/src/autoyast-rnc/online_update_configuration.rnc
2022-05-27 15:49:00.000000000 +0200
@@ -13,7 +13,7 @@
auto_agree_with_licenses? &
include_recommends? &
update_interval? &
- category_filter? &
+ (category_filter | nested_category_filter)? &
use_deltarpm?
)
}
@@ -25,5 +25,12 @@
include_recommends = element include_recommends { BOOLEAN }
use_deltarpm = element use_deltarpm { BOOLEAN }
update_interval = element update_interval { STRING }
+
category_filter = element category_filter { LIST, category* }
-category = element category { STRING }
+category = element (category | listentry) { STRING }
+
+# Support for the old category_filter format (bsc#1198848)
+nested_category_filter = element category_filter {
+ MAP,
+ element category { LIST, category* }
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-online-update-configuration-4.5.0/src/modules/OnlineUpdateConfiguration.rb
new/yast2-online-update-configuration-4.5.1/src/modules/OnlineUpdateConfiguration.rb
---
old/yast2-online-update-configuration-4.5.0/src/modules/OnlineUpdateConfiguration.rb
2022-04-12 13:36:19.000000000 +0200
+++
new/yast2-online-update-configuration-4.5.1/src/modules/OnlineUpdateConfiguration.rb
2022-05-27 15:49:00.000000000 +0200
@@ -588,11 +588,8 @@
@includeRecommends
)
@use_deltarpm = settings.fetch('use_deltarpm', @use_deltarpm)
- @currentCategories = Convert.convert(
- Ops.get(settings, ["category_filter", "category"], @currentCategories),
- :from => "any",
- :to => "list <string>"
- )
+
+ @currentCategories = get_category_filter(settings["category_filter"])
getInterval = Ops.get_string(settings, "update_interval", "")
@@ -604,7 +601,6 @@
true
end
-
# Write()
def Write
SCR.Write(
@@ -665,7 +661,7 @@
@updateInterval,
:name
),
- "category_filter" => { "category" => @currentCategories
}
+ "category_filter" => @currentCategories
}
end
@@ -694,6 +690,20 @@
publish :function => :Import, :type => "boolean (map)"
publish :function => :Write, :type => "boolean ()"
publish :function => :Export, :type => "map ()"
+
+ private
+
+ def get_category_filter(category_filter)
+ case category_filter
+ when Array
+ category_filter
+ when Hash
+ category_filter.fetch("category", [])
+ else
+ []
+ end
+ end
+
end
OnlineUpdateConfiguration = OnlineUpdateConfigurationClass.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-online-update-configuration-4.5.0/test/online_update_configuration_test.rb
new/yast2-online-update-configuration-4.5.1/test/online_update_configuration_test.rb
---
old/yast2-online-update-configuration-4.5.0/test/online_update_configuration_test.rb
1970-01-01 01:00:00.000000000 +0100
+++
new/yast2-online-update-configuration-4.5.1/test/online_update_configuration_test.rb
2022-05-27 15:49:00.000000000 +0200
@@ -0,0 +1,80 @@
+# Copyright (c) [2022] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "test_helper"
+
+Yast.import "OnlineUpdateConfiguration"
+
+describe Yast::OnlineUpdateConfiguration do
+ before { subject.main }
+
+ let(:profile) do
+ {
+ "enable_automatic_online_update" => true,
+ "skip_interactive_patches" => false,
+ "auto_agree_with_licenses" => true,
+ "use_deltarpm" => false,
+ "include_recommends" => true,
+ "update_interval" => "daily",
+ "category_filter" => ["security"]
+ }
+ end
+
+ describe "#Import" do
+ it "imports online update settings" do
+ subject.Import(profile)
+ expect(subject.enableAOU).to eq(true)
+ expect(subject.skipInteractivePatches).to eq(false)
+ expect(subject.autoAgreeWithLicenses).to eq(true)
+ expect(subject.use_deltarpm).to eq(false)
+ expect(subject.includeRecommends).to eq(true)
+ expect(subject.updateInterval).to eq(:daily)
+ expect(subject.currentCategories).to eq(["security"])
+ end
+
+ context "when an empty profile is given" do
+ it "keeps the default values" do
+ subject.Import({})
+ expect(subject.enableAOU).to eq(false)
+ expect(subject.skipInteractivePatches).to eq(true)
+ expect(subject.autoAgreeWithLicenses).to eq(false)
+ expect(subject.use_deltarpm).to eq(true)
+ expect(subject.includeRecommends).to eq(false)
+ expect(subject.updateInterval).to eq(:weekly)
+ expect(subject.currentCategories).to eq([])
+ end
+ end
+ end
+
+ describe "#Export" do
+ it "exports online update settings" do
+ subject.Import(profile)
+ expect(subject.Export).to eq(profile)
+ end
+
+ context "when it uses the old format for category_filter" do
+ it "sets the categories filter" do
+ subject.Import(
+ profile.merge("category_filter" => { "category" => ["security"]})
+ )
+ expect(subject.currentCategories).to eq(["security"])
+ end
+ end
+ end
+end