Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2020-06-14 18:15:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2" Sun Jun 14 18:15:41 2020 rev:278 rq:814154 version:4.3.13 Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2020-06-11 14:44:52.577412967 +0200 +++ /work/SRC/openSUSE:Factory/.autoyast2.new.3606/autoyast2.changes 2020-06-14 18:15:43.462923090 +0200 @@ -1,0 +2,14 @@ +Fri Jun 12 11:18:00 UTC 2020 - Imobach Gonzalez Sosa <[email protected]> + +- AutoinstGeneral.SetRebootAfterFirstStage is not private + anymore (bsc#1172865). +- 4.3.13 + +------------------------------------------------------------------- +Thu Jun 11 20:44:06 UTC 2020 - Josef Reidinger <[email protected]> + +- Do not export Report section when cloning system as it is always + just defaults (bsc#1172749) +- 4.3.12 + +------------------------------------------------------------------- Old: ---- autoyast2-4.3.11.tar.bz2 New: ---- autoyast2-4.3.13.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.zeTtGc/_old 2020-06-14 18:15:44.562925913 +0200 +++ /var/tmp/diff_new_pack.zeTtGc/_new 2020-06-14 18:15:44.562925913 +0200 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.3.11 +Version: 4.3.13 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only ++++++ autoyast2-4.3.11.tar.bz2 -> autoyast2-4.3.13.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/doc/error_reporting.md new/autoyast2-4.3.13/doc/error_reporting.md --- old/autoyast2-4.3.11/doc/error_reporting.md 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.3.13/doc/error_reporting.md 2020-06-12 14:14:22.000000000 +0200 @@ -0,0 +1,93 @@ +# Error Reporting in AutoYaST + +This document tries to summarize the error reporting mechanisms that, as a developer, you can use +when writing code for AutoYaST. Bear in mind that both mechanisms have different purposes. On the +one hand, the `Yast::Report` module is the way to go when you want to notify a general problem or +ask a Yes/No question. On the other hand, the purpose of the AutoYaST issues mechanism is to notify +semantic issues in the profile. + +## Yast::Report Module + +The `Yast::Report` module offers a simple and configurable mechanism for error reporting. It relies +on the `Yast::Popup` mechanism but offers a few additional features: + +* Show/Hide messages depending on its severity (error, messages, yes/no questions, etc.). +* Messages logging. +* Time-outs. +* Support for the command line interface. + +```ruby +Yast.import "Report" +Yast::Report.Error("Something was wrong") +``` + +Usually, the reporting settings are defined in the AutoYaST profile. For instance, with the +following settings, AutoYaST stops only when an error message is reported. For the rest, it applies +a 10 seconds time-out. Additionally, all messages are logged. + +```xml +<report> + <errors> + <show config:type="boolean">true</show> + <timeout config:type="integer">0</timeout> + <log config:type="boolean">true</log> + </errors> + <warnings> + <show config:type="boolean">true</show> + <timeout config:type="integer">10</timeout> + <log config:type="boolean">true</log> + </warnings> + <messages> + <show config:type="boolean">true</show> + <timeout config:type="integer">10</timeout> + <log config:type="boolean">true</log> + </messages> + <yesno_messages> + <show config:type="boolean">true</show> + <timeout config:type="integer">10</timeout> + <log config:type="boolean">true</log> + </yesno_messages> +</report> +``` + +However, this module is not limited to work in AutoYaST, and can be used in any other part of YaST. + +## The New AutoYaST Issues Mechanism + +In openSUSE Leap 15.0 and SUSE Linux Enterprise SLE 15, AutoYaST introduced a mechanism to report +semantic issues in the profile. At the beginning, it was implemented as part of the storage-ng +initiative, and later it was [generalized](https://github.com/yast/yast-autoinstallation/pull/431) +to be used by other parts of AutoYaST. It is still a work in progress, so expect small changes in +the API. + +The core of the implementation lives in the [Installation::AutoinstIssues +module](https://github.com/yast/yast-yast2/blob/5902d449f108bba6edcbccad8394ed93dc9cae39/library/general/src/lib/installation/autoinst_issues). +Each kind of issue is represented by a class which inherits from [Installation::AutoinstIssues::Issue +class](https://github.com/yast/yast-yast2/blob/5902d449f108bba6edcbccad8394ed93dc9cae39/library/general/src/lib/installation/autoinst_issues/issue.rb). +Classes for common problems, like `InvalidValue` and `MissingValue`, are already offered but you are +free to implement your own. For instance, see the +[Y2Storage::AutoinstIssues](https://github.com/yast/yast-storage-ng/tree/master/src/lib/y2storage/autoinst_issues) +for additional examples. + +All reported problems are added to an [IssuesList +instance](https://github.com/yast/yast-yast2/blob/5902d449f108bba6edcbccad8394ed93dc9cae39/library/general/src/lib/installation/autoinst_issues/list.rb) +which is accessible through the `Yast::AutoInstall` module. So, in order to register a problem, you +use the `IssuesList#add` method. + +```ruby +Yast::AutoInstall.issues_list.add( + ::Installation::AutoinstIssues::InvalidValue, + firewall_section, # the firewall section is an instance of a Installation::AutoinstProfile::SectionWithAttributes subclass + "FW_DEV_INT", + "1", + _("It is not supported anymore.")) +) +``` + +An important difference with the `Yast::Report` mechanism is that the messages are not shown when +they are added. Instead, all of them are displayed at the same point, [after the profile is +imported](https://github.com/yast/yast-autoinstallation/blob/2edc7bf7d1cee1310a5c120ce9a131d6ff9a430f/src/clients/inst_autosetup.rb#L430). +Moreover, reporting errors and warning settings are honored when displaying those messages. Check +the +[Yast::AutoInstall#valid_imported_values](https://github.com/yast/yast-autoinstallation/blob/2edc7bf7d1cee1310a5c120ce9a131d6ff9a430f/src/modules/AutoInstall.rb#L329) +for further details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/package/autoyast2.changes new/autoyast2-4.3.13/package/autoyast2.changes --- old/autoyast2-4.3.11/package/autoyast2.changes 2020-06-11 09:51:37.000000000 +0200 +++ new/autoyast2-4.3.13/package/autoyast2.changes 2020-06-12 14:14:22.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Fri Jun 12 11:18:00 UTC 2020 - Imobach Gonzalez Sosa <[email protected]> + +- AutoinstGeneral.SetRebootAfterFirstStage is not private + anymore (bsc#1172865). +- 4.3.13 + +------------------------------------------------------------------- +Thu Jun 11 20:44:06 UTC 2020 - Josef Reidinger <[email protected]> + +- Do not export Report section when cloning system as it is always + just defaults (bsc#1172749) +- 4.3.12 + +------------------------------------------------------------------- Tue Jun 9 13:08:12 UTC 2020 - Josef Reidinger <[email protected]> - Autoyast User Scripts Improvements: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/package/autoyast2.spec new/autoyast2-4.3.13/package/autoyast2.spec --- old/autoyast2-4.3.11/package/autoyast2.spec 2020-06-11 09:51:37.000000000 +0200 +++ new/autoyast2-4.3.13/package/autoyast2.spec 2020-06-12 14:14:22.000000000 +0200 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.3.11 +Version: 4.3.13 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/src/modules/AutoinstClone.rb new/autoyast2-4.3.13/src/modules/AutoinstClone.rb --- old/autoyast2-4.3.11/src/modules/AutoinstClone.rb 2020-06-11 09:51:37.000000000 +0200 +++ new/autoyast2-4.3.13/src/modules/AutoinstClone.rb 2020-06-12 14:14:22.000000000 +0200 @@ -128,9 +128,6 @@ Call.Function("general_auto", ["Import", General()]) Call.Function("general_auto", ["SetModified"]) - Call.Function("report_auto", ["Import", Report.Export]) - Call.Function("report_auto", ["SetModified"]) - Profile.Prepare nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/src/modules/AutoinstGeneral.rb new/autoyast2-4.3.13/src/modules/AutoinstGeneral.rb --- old/autoyast2-4.3.11/src/modules/AutoinstGeneral.rb 2020-06-11 09:51:37.000000000 +0200 +++ new/autoyast2-4.3.13/src/modules/AutoinstGeneral.rb 2020-06-12 14:14:22.000000000 +0200 @@ -457,6 +457,21 @@ nil end + # Set the "kexec_reboot" flag in the product + # description in order to force a reboot with + # kexec at the end of the first installation + # stage. + # @return [void] + def SetRebootAfterFirstStage + return unless mode.key?("forceboot") + + ProductFeatures.SetBooleanFeature( + "globals", + "kexec_reboot", + !mode["forceboot"] + ) + end + publish variable: :second_stage, type: "boolean" publish variable: :mode, type: "map" publish variable: :signature_handling, type: "map" @@ -476,21 +491,6 @@ private attr_reader :cio_ignore - - # Set the "kexec_reboot" flag in the product - # description in order to force a reboot with - # kexec at the end of the first installation - # stage. - # @return [void] - def SetRebootAfterFirstStage - return unless mode.key?("forceboot") - - ProductFeatures.SetBooleanFeature( - "globals", - "kexec_reboot", - !mode["forceboot"] - ) - end end AutoinstGeneral = AutoinstGeneralClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.3.11/test/autoinst_clone_test.rb new/autoyast2-4.3.13/test/autoinst_clone_test.rb --- old/autoyast2-4.3.11/test/autoinst_clone_test.rb 2020-06-11 09:51:37.000000000 +0200 +++ new/autoyast2-4.3.13/test/autoinst_clone_test.rb 2020-06-12 14:14:22.000000000 +0200 @@ -96,11 +96,9 @@ subject.Process end - it "imports 'general' and 'report' settings" do + it "imports 'general' settings" do expect(Yast::Call).to receive(:Function).with("general_auto", ["Import", Hash]) expect(Yast::Call).to receive(:Function).with("general_auto", ["SetModified"]) - expect(Yast::Call).to receive(:Function).with("report_auto", ["Import", Hash]) - expect(Yast::Call).to receive(:Function).with("report_auto", ["SetModified"]) subject.Process end
