Hello community,
here is the log from the commit of package yast2-configuration-management for
openSUSE:Leap:15.2 checked in at 2020-04-08 12:47:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2-configuration-management (Old)
and /work/SRC/openSUSE:Leap:15.2/.yast2-configuration-management.new.3248
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-configuration-management"
Wed Apr 8 12:47:46 2020 rev:31 rq:790786 version:4.2.4
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/yast2-configuration-management/yast2-configuration-management.changes
2020-01-15 16:32:07.628878263 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.yast2-configuration-management.new.3248/yast2-configuration-management.changes
2020-04-08 12:47:48.078324848 +0200
@@ -1,0 +2,6 @@
+Mon Mar 30 21:01:50 UTC 2020 - Imobach Gonzalez Sosa <[email protected]>
+
+- Do not force to use formulas during the 1st stage (bsc#1168080).
+- 4.2.4
+
+-------------------------------------------------------------------
Old:
----
yast2-configuration-management-4.2.3.tar.bz2
New:
----
yast2-configuration-management-4.2.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-configuration-management.spec ++++++
--- /var/tmp/diff_new_pack.Gxk1ck/_old 2020-04-08 12:47:48.466325044 +0200
+++ /var/tmp/diff_new_pack.Gxk1ck/_new 2020-04-08 12:47:48.470325046 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-configuration-management
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-configuration-management
-Version: 4.2.3
+Version: 4.2.4
Release: 0
Url: https://github.com/yast/yast-migration
Summary: YaST2 - YaST Configuration Management
++++++ yast2-configuration-management-4.2.3.tar.bz2 ->
yast2-configuration-management-4.2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/package/yast2-configuration-management.changes
new/yast2-configuration-management-4.2.4/package/yast2-configuration-management.changes
---
old/yast2-configuration-management-4.2.3/package/yast2-configuration-management.changes
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/package/yast2-configuration-management.changes
2020-03-31 12:00:20.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Mar 30 21:01:50 UTC 2020 - Imobach Gonzalez Sosa <[email protected]>
+
+- Do not force to use formulas during the 1st stage (bsc#1168080).
+- 4.2.4
+
+-------------------------------------------------------------------
Tue Dec 17 14:12:07 UTC 2019 - Imobach Gonzalez Sosa <[email protected]>
- Remove the AutoYaST User Interface menu entry for the module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/package/yast2-configuration-management.spec
new/yast2-configuration-management-4.2.4/package/yast2-configuration-management.spec
---
old/yast2-configuration-management-4.2.3/package/yast2-configuration-management.spec
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/package/yast2-configuration-management.spec
2020-03-31 12:00:20.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-configuration-management
-Version: 4.2.3
+Version: 4.2.4
Release: 0
Url: https://github.com/yast/yast-migration
Summary: YaST2 - YaST Configuration Management
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/clients/configuration_management_finish.rb
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/clients/configuration_management_finish.rb
---
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/clients/configuration_management_finish.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/clients/configuration_management_finish.rb
2020-03-31 12:00:20.000000000 +0200
@@ -24,8 +24,8 @@
# otherwise it returns false.
def write
return false if config.nil?
- log.info("Provisioning Configuration Management")
- configurator.prepare
+ log.info("Provisioning Configuration Management with config
#{config.inspect}")
+ configurator.prepare(require_formulas: false)
# saving settings to target system
Y2ConfigurationManagement::Clients::Provision.new.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/clients/main.rb
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/clients/main.rb
---
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/clients/main.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/clients/main.rb
2020-03-31 12:00:20.000000000 +0200
@@ -62,7 +62,7 @@
log.info("Provisioning Configuration Management")
config =
Y2ConfigurationManagement::Configurations::Base.import(settings)
configurator =
Y2ConfigurationManagement::Configurators::Base.for(config)
- ret = configurator.prepare
+ ret = configurator.prepare(require_formulas: true)
return ret unless ret == :finish
if
!Yast::PackageSystem.CheckAndInstallPackages(configurator.packages.fetch("install",
[]))
return :abort
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/configurators/salt.rb
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/configurators/salt.rb
---
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/configurators/salt.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/configurators/salt.rb
2020-03-31 12:00:20.000000000 +0200
@@ -26,11 +26,14 @@
PUBLIC_KEY_PATH = "/etc/salt/pki/minion/minion.pub".freeze
# @see Base#prepare
- mode(:masterless) do |reverse: false|
+ mode(:masterless) do |reverse: false, require_formulas: false|
fetch_config(config.states_url, config.work_dir) if config.states_url
fetch_config(config.pillar_url, config.pillar_root) if
config.pillar_url
update_configuration
- Y2ConfigurationManagement::Salt::FormulaSequence.new(config, reverse:
reverse).run
+ sequence = Y2ConfigurationManagement::Salt::FormulaSequence.new(
+ config, reverse: reverse, require_formulas: require_formulas
+ )
+ sequence.run
end
# @see Base#prepare
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/salt/formula_sequence.rb
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/salt/formula_sequence.rb
---
old/yast2-configuration-management-4.2.3/src/lib/y2configuration_management/salt/formula_sequence.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/src/lib/y2configuration_management/salt/formula_sequence.rb
2020-03-31 12:00:20.000000000 +0200
@@ -45,11 +45,14 @@
# Constructor
#
# @macro seeSequence
- # @param config [Yast::ConfigurationManagement::Configurations::Salt]
- def initialize(config, reverse: false)
+ # @param config [Yast::ConfigurationManagement::Configurations::Salt]
+ # @param reverse [Boolean] Runs the sequence in reverse order
+ # @param require_formulas
+ def initialize(config, reverse: false, require_formulas: false)
textdomain "configuration_management"
@config = config
@reverse = reverse
+ @require_formulas = require_formulas
read_formulas
end
@@ -60,10 +63,7 @@
# It runs the {FormulaSelection} dialog
def choose_formulas
- if Array.new(formulas).empty?
- Yast::Report.Error(_("There are no formulas available. Please check
the log files."))
- return :abort
- end
+ return handle_no_formulas if Array.new(formulas).empty?
if config.enabled_states.empty?
enable_formulas_by_user
@@ -100,16 +100,17 @@
private
- attr_reader :reverse
+ attr_reader :reverse, :require_formulas
# @macro seeSequence
def sequence_hash
{
START => reverse ? "configure_formulas" :
"choose_formulas",
"choose_formulas" => {
- abort: :abort,
- next: "configure_formulas",
- back: :back
+ abort: :abort,
+ next: "configure_formulas",
+ back: :back,
+ finish: :finish
},
"configure_formulas" => {
cancel: "choose_formulas",
@@ -153,6 +154,18 @@
.select { |f| config.enabled_states.include?(f.id) }
.each { |f| f.enabled = true }
end
+
+ # Handles the case where there are no formulas
+ #
+ # FIXME: reading formulas should be done outside this sequence so we can
+ # decide outside how to deal with this case.
+ #
+ # @return [Symbol] Symbol that the sequence should return
+ def handle_no_formulas
+ return :finish unless require_formulas
+ Yast::Report.Error(_("There are no formulas available. Please check
the log files."))
+ :abort
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/test/y2configuration_management/clients/finish_client_test.rb
new/yast2-configuration-management-4.2.4/test/y2configuration_management/clients/finish_client_test.rb
---
old/yast2-configuration-management-4.2.3/test/y2configuration_management/clients/finish_client_test.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/test/y2configuration_management/clients/finish_client_test.rb
2020-03-31 12:00:20.000000000 +0200
@@ -35,7 +35,7 @@
let(:config) { double("config", enable_services: false) }
it "runs the configurator" do
- expect(configurator).to receive(:prepare)
+ expect(configurator).to receive(:prepare).with(require_formulas: false)
client.write
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/test/y2configuration_management/clients/main_test.rb
new/yast2-configuration-management-4.2.4/test/y2configuration_management/clients/main_test.rb
---
old/yast2-configuration-management-4.2.3/test/y2configuration_management/clients/main_test.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/test/y2configuration_management/clients/main_test.rb
2020-03-31 12:00:20.000000000 +0200
@@ -88,6 +88,11 @@
end
end
+ it "configures the provisioner" do
+ expect(configurator).to receive(:prepare).with(require_formulas: true)
+ main.run
+ end
+
it "ensures that needed packages are installed" do
expect(Yast::PackageSystem).to
receive(:CheckAndInstallPackages).with(["salt"])
.and_return(true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/test/y2configuration_management/configurators/salt_test.rb
new/yast2-configuration-management-4.2.4/test/y2configuration_management/configurators/salt_test.rb
---
old/yast2-configuration-management-4.2.3/test/y2configuration_management/configurators/salt_test.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/test/y2configuration_management/configurators/salt_test.rb
2020-03-31 12:00:20.000000000 +0200
@@ -96,9 +96,9 @@
configurator.prepare
end
- it "runs the configuration_management_formula client" do
+ it "runs the formulas sequence" do
expect(Y2ConfigurationManagement::Salt::FormulaSequence).to
receive(:new)
- .with(config, reverse: false).and_return(formula_sequence)
+ .with(config, reverse: false, require_formulas:
false).and_return(formula_sequence)
configurator.prepare
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-configuration-management-4.2.3/test/y2configuration_management/salt/formula_sequence_test.rb
new/yast2-configuration-management-4.2.4/test/y2configuration_management/salt/formula_sequence_test.rb
---
old/yast2-configuration-management-4.2.3/test/y2configuration_management/salt/formula_sequence_test.rb
2019-12-17 16:27:59.000000000 +0100
+++
new/yast2-configuration-management-4.2.4/test/y2configuration_management/salt/formula_sequence_test.rb
2020-03-31 12:00:20.000000000 +0200
@@ -41,7 +41,7 @@
end
let(:tmpdir) { Pathname(Dir.mktmpdir) }
let(:reverse) { false }
- subject(:sequence) { described_class.new(config, reverse: reverse) }
+ subject(:sequence) { described_class.new(config, reverse: reverse,
require_formulas: true) }
before do
allow(config).to receive(:work_dir).and_return(tmpdir)
@@ -130,13 +130,25 @@
it "reports an error" do
expect(Yast::Report).to receive(:Error).with(/There are no formulas
available/)
-
sequence.choose_formulas
end
it "returns :abort" do
expect(sequence.choose_formulas).to eql(:abort)
end
+
+ context "but formulas are not required" do
+ subject(:sequence) { described_class.new(config, require_formulas:
false) }
+
+ it "does not report any error" do
+ expect(Yast::Report).to_not receive(:Error)
+ sequence.choose_formulas
+ end
+
+ it "returns :finish" do
+ expect(sequence.choose_formulas).to eql(:finish)
+ end
+ end
end
end