Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2015-08-10 09:14:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2015-07-27 09:09:13.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2015-08-10 09:14:38.000000000 +0200 @@ -1,0 +2,16 @@ +Mon Aug 3 14:29:05 UTC 2015 - [email protected] + +- Fixed a conflict between Wizard and CommandLine components that + was breaking the CLI for some modules (bnc#940341) +- 3.1.144 + +------------------------------------------------------------------- +Tue Jul 28 10:50:05 UTC 2015 - [email protected] + +- Properly display information about exceptions when running in + command line mode (bnc#939565). +- Fixed a bug preventing Yast::CommandLine to be executed twice + in the same script. +- 3.1.143 + +------------------------------------------------------------------- Old: ---- yast2-3.1.142.tar.bz2 New: ---- yast2-3.1.144.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.Quw4LJ/_old 2015-08-10 09:14:39.000000000 +0200 +++ /var/tmp/diff_new_pack.Quw4LJ/_new 2015-08-10 09:14:39.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.142 +Version: 3.1.144 Release: 0 Url: https://github.com/yast/yast-yast2 ++++++ yast2-3.1.142.tar.bz2 -> yast2-3.1.144.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/.travis.yml new/yast2-3.1.144/.travis.yml --- old/yast2-3.1.142/.travis.yml 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/.travis.yml 2015-08-03 18:42:35.000000000 +0200 @@ -5,7 +5,7 @@ # disable rvm, use system Ruby - rvm reset - wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh - - sh ./travis_setup.sh -p "rake yast2-core yast2-devtools yast2-testsuite yast2-ruby-bindings yast2 yast2-pkg-bindings" -g "rspec:2.14.1 yast-rake gettext simplecov coveralls rubocop:0.29.1" + - sh ./travis_setup.sh -p "rake yast2-core yast2-devtools yast2-testsuite yast2-ruby-bindings yast2 yast2-pkg-bindings" -g "rspec:3.3.0 yast-rake gettext simplecov coveralls rubocop:0.29.1" script: - rake check:pot - rubocop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/Makefile.am new/yast2-3.1.144/library/commandline/Makefile.am --- old/yast2-3.1.142/library/commandline/Makefile.am 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/library/commandline/Makefile.am 2015-08-03 18:42:35.000000000 +0200 @@ -2,4 +2,4 @@ # Makefile.am for yast2/library/commandline # -SUBDIRS = doc src testsuite +SUBDIRS = doc src testsuite test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/src/modules/CommandLine.rb new/yast2-3.1.144/library/commandline/src/modules/CommandLine.rb --- old/yast2-3.1.142/library/commandline/src/modules/CommandLine.rb 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/library/commandline/src/modules/CommandLine.rb 2015-08-03 18:42:35.000000000 +0200 @@ -1491,47 +1491,6 @@ Ops.get_string(cmds, 0) end - def fake_false - false - end - - def RunFunction(funct) - funct = deep_copy(funct) - Report.ClearAll - my_funct = deep_copy(funct) - ret = my_funct.call - report = Report.GetMessages( - Ops.greater_than(Report.NumWarnings, 0), - Ops.greater_than(Report.NumErrors, 0), - Ops.greater_than(Report.NumMessages, 0), - Ops.greater_than(Report.NumYesNoMessages, 0) - ) - if Ops.greater_than(Builtins.size(report), 0) - Yast.import "RichText" - Print(RichText.Rich2Plain(report)) - end - ret - end - - def RunMapFunction(funct, arg) - funct = deep_copy(funct) - arg = deep_copy(arg) - Report.ClearAll - my_funct = deep_copy(funct) - ret = my_funct.call(arg) - report = Report.GetMessages( - Ops.greater_than(Report.NumWarnings, 0), - Ops.greater_than(Report.NumErrors, 0), - Ops.greater_than(Report.NumMessages, 0), - Ops.greater_than(Report.NumYesNoMessages, 0) - ) - if Ops.greater_than(Builtins.size(report), 0) - Yast.import "RichText" - Print(RichText.Rich2Plain(report)) - end - ret - end - # Parse the Command Line # # Function to parse the command line, start a GUI or handle interactive and @@ -1549,6 +1508,7 @@ Builtins.y2milestone("Command line interface started") # Initialize the arguments + @done = false return !Aborted() if !Init(commandline, WFM.Args) ret = true @@ -1596,15 +1556,6 @@ return ret end else - # disable Reports, we handle them on our own - Report.Import( - - "messages" => { "show" => false }, - "warnings" => { "show" => false }, - "errors" => { "show" => false } - - ) - # translators: progress message - command line interface ready PrintVerbose(_("Ready")) @@ -1621,18 +1572,7 @@ Ops.get(commandline, "initialize") # non-GUI handling PrintVerbose(_("Initializing")) - ret2 = RunFunction( - Convert.convert( - Ops.get( - commandline, - "initialize", - fun_ref(method(:fake_false), "boolean ()") - ), - from: "any", - to: "boolean ()" - ) - ) - + ret2 = commandline["initialize"].call if !ret2 Builtins.y2milestone("Module initialization failed") return false @@ -1650,7 +1590,7 @@ # there is a handler, execute the action if !exec.nil? - res = RunMapFunction(exec, options) + res = exec.call(options) # if it is not interactive, abort on errors Abort() if !Interactive() && res == false @@ -1668,17 +1608,7 @@ if ret && Ops.get(commandline, "finish") && initialized # translators: Progress message - the command line interface is about to finish PrintVerbose(_("Finishing")) - ret = RunFunction( - Convert.convert( - Ops.get( - commandline, - "finish", - fun_ref(method(:fake_false), "boolean ()") - ), - from: "any", - to: "boolean ()" - ) - ) + ret = commandline["finish"].call if !ret Builtins.y2milestone("Module finishing failed") return false @@ -1757,9 +1687,6 @@ publish function: :Abort, type: "void ()" publish function: :Done, type: "boolean ()" publish function: :UniqueOption, type: "string (map <string, string>, list)" - publish function: :fake_false, type: "boolean ()", private: true - publish function: :RunFunction, type: "boolean (boolean ())", private: true - publish function: :RunMapFunction, type: "boolean (boolean (map <string, string>), map <string, string>)", private: true publish function: :Run, type: "any (map)" publish function: :YesNo, type: "boolean ()" publish function: :Verbose, type: "boolean ()" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/test/Makefile.am new/yast2-3.1.144/library/commandline/test/Makefile.am --- old/yast2-3.1.142/library/commandline/test/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.144/library/commandline/test/Makefile.am 2015-08-03 18:42:35.000000000 +0200 @@ -0,0 +1,7 @@ +TESTS = \ + commandline_test.rb + +TEST_EXTENSIONS = .rb +RB_LOG_COMPILER = rspec +VERBOSE = 1 +EXTRA_DIST = $(TESTS) test_helper.rb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/test/clients/dummy_cmdline.rb new/yast2-3.1.144/library/commandline/test/clients/dummy_cmdline.rb --- old/yast2-3.1.142/library/commandline/test/clients/dummy_cmdline.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.144/library/commandline/test/clients/dummy_cmdline.rb 2015-08-03 18:42:35.000000000 +0200 @@ -0,0 +1,68 @@ +module Yast + class DummyCmdlineClient < Client + def main + Yast.import "CommandLine" + + # Command line definition + cmdline = { + # Commandline help title + "help" => "Dummy test client", + "id" => "dummy", + "initialize" => fun_ref(method(:init), "boolean ()"), + "finish" => proc { puts "Finish called" }, + "actions" => { + "echo" => { + # Commandline command help + "help" => _( + "Prints the passed argument" + ), + "example" => "dummy echo text=something", + "handler" => fun_ref( + method(:echo_handler), + "boolean (map <string, string>)" + ) + }, + "crash" => { + # Commandline command help + "help" => _( + "Raises an exception" + ), + "example" => "dummy crash", + "handler" => fun_ref( + method(:crash_handler), + "boolean (map <string, string>)" + ) + } + }, + "options" => { + "text" => { + # Commandline option help + "help" => "Any text", + "type" => "string" + } + }, + "mappings" => { + "echo" => ["text"] + } + } + + CommandLine.Run(cmdline) + end + + def init + puts "Initialize called" + true + end + + def echo_handler(options) + puts options["text"] + true + end + + def crash_handler(_options) + raise "I crashed" + end + end +end + +Yast::DummyCmdlineClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/test/commandline_test.rb new/yast2-3.1.144/library/commandline/test/commandline_test.rb --- old/yast2-3.1.142/library/commandline/test/commandline_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.144/library/commandline/test/commandline_test.rb 2015-08-03 18:42:35.000000000 +0200 @@ -0,0 +1,23 @@ +#! /usr/bin/env rspec + +require_relative "test_helper" + +Yast.import "CommandLine" + +describe Yast::CommandLine do + it "invokes initialize, handler and finish" do + expect(STDOUT).to receive(:puts).with("Initialize called").ordered + expect(STDOUT).to receive(:puts).with("something").ordered + expect(STDOUT).to receive(:puts).with("Finish called").ordered + + Yast::WFM.CallFunction("dummy_cmdline", ["echo", "text=something"]) + end + + it "displays errors and aborts" do + expect(STDOUT).to receive(:puts).with("Initialize called").ordered + expect(Yast::CommandLine).to receive(:Print).with(/I crashed/).ordered + expect(STDOUT).to_not receive(:puts).with("Finish called") + + Yast::WFM.CallFunction("dummy_cmdline", ["crash"]) + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/commandline/test/test_helper.rb new/yast2-3.1.144/library/commandline/test/test_helper.rb --- old/yast2-3.1.142/library/commandline/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.144/library/commandline/test/test_helper.rb 2015-08-03 18:42:35.000000000 +0200 @@ -0,0 +1 @@ +require_relative "../../../test/test_helper.rb" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/general/src/lib/installation/proposal_client.rb new/yast2-3.1.144/library/general/src/lib/installation/proposal_client.rb --- old/yast2-3.1.142/library/general/src/lib/installation/proposal_client.rb 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/library/general/src/lib/installation/proposal_client.rb 2015-08-03 18:42:35.000000000 +0200 @@ -49,6 +49,23 @@ # # * main program calls each sub-module to write the settings to the system # + # ## The `Write` method + # + # In addition to the methods defined (and documented) in + # {Installation::ProposalClient}, there's a method called `Write` which will + # write the proposed (and probably modified) settings to the system. + # + # It is up to the proposal dispatcher how it remembers the settings. The + # errors must be reported using the Report:: module to have the possibility + # to control the behaviour from the main program. + # + # This `Write` method is optional. The dispatcher module is required to allow + # this method to be called without returning an error value if it is not + # there. + # + # #### Return Values + # + # Returns true, if the settings were written successfully. class ProposalClient < Yast::Client include Yast::Logger @@ -146,6 +163,24 @@ # Help text for this module which appears in the standard dialog # help (particular helps for modules sorted by presentation order). # + # * **`"trigger"`** [Hash, nil] defines circumstances when the proposal + # should be called again at the end. For instance, when partitioning or + # software selection changes. Mandatory keys of the trigger are: + # * **`"expect"`** [Hash] containing _string_ `class` and _string_ + # `method` that will be called and its result compared with `value`. + # * **`"value"`** [Object] expected value, if evaluated code does not + # match the `value`, proposal will be called again. + # + # @example Triggers definition + # { + # "trigger" => { + # "expect" => { + # "class" => "Yast::Packages", + # "method" => "CountSizeToBeDownloaded" + # }, + # "value" => 88883333 + # } + # } def make_proposal(_attrs) raise NotImplementedError, "Calling abstract method 'make_proposal'" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/packages/test/package_callbacks_test.rb new/yast2-3.1.144/library/packages/test/package_callbacks_test.rb --- old/yast2-3.1.142/library/packages/test/package_callbacks_test.rb 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/library/packages/test/package_callbacks_test.rb 2015-08-03 18:42:35.000000000 +0200 @@ -3,53 +3,78 @@ require_relative "test_helper" Yast.import "PackageCallbacks" +Yast.import "Mode" +Yast.import "UI" describe Yast::PackageCallbacks do subject { Yast::PackageCallbacks } describe "#textmode" do - it "returns true if runned as CLI" do - mode = double(commandline: true) - stub_const("Yast::Mode", mode) + subject(:textmode) { Yast::PackageCallbacks.send(:textmode) } - expect(subject.send(:textmode)).to eq true + before do + allow(Yast::Mode).to receive(:commandline).and_return commandline + allow(Yast::UI).to receive(:GetDisplayInfo) + .and_return("TextMode" => display_textmode) end - it "returns true if running in TUI" do - ui = double(GetDisplayInfo: { "TextMode" => true }) - stub_const("Yast::UI", ui) + context "running in CLI" do + let(:commandline) { true } + let(:display_textmode) { nil } - expect(subject.send(:textmode)).to eq true + it "returns true" do + expect(textmode).to eq true + end end - it "returns false in other cases" do - ui = double(GetDisplayInfo: { "TextMode" => false }) - stub_const("Yast::UI", ui) + context "running in TUI" do + let(:commandline) { false } + let(:display_textmode) { true } + + it "returns true" do + expect(textmode).to eq true + end + end + + context "in other cases" do + let(:commandline) { false } + let(:display_textmode) { false } - expect(subject.send(:textmode)).to eq false + it "returns false" do + expect(textmode).to eq false + end end end describe "#display_width" do - it "returns 0 if runned as CLI" do - mode = double(commandline: true) - stub_const("Yast::Mode", mode) - - expect(subject.send(:display_width)).to eq 0 + before do + allow(Yast::Mode).to receive(:commandline).and_return commandline end - it "returns value from display info" do - ui = double(GetDisplayInfo: { "Width" => 480 }) - stub_const("Yast::UI", ui) + context "running as CLI" do + let(:commandline) { true } - expect(subject.send(:display_width)).to eq 480 + it "returns 0" do + expect(subject.send(:display_width)).to eq 0 + end end - it "returns 0 if value missing in display info" do - ui = double(GetDisplayInfo: {}) - stub_const("Yast::UI", ui) + context "running with full UI" do + let(:commandline) { false } + + it "returns value from display info" do + ui = double(GetDisplayInfo: { "Width" => 480 }) + stub_const("Yast::UI", ui) + + expect(subject.send(:display_width)).to eq 480 + end + + it "returns 0 if value missing in display info" do + ui = double(GetDisplayInfo: {}) + stub_const("Yast::UI", ui) - expect(subject.send(:display_width)).to eq 0 + expect(subject.send(:display_width)).to eq 0 + end end end @@ -130,14 +155,14 @@ describe "full_screen" do it "returns false if running in CLI" do - mode = double(commandline: true) - stub_const("Yast::Mode", mode) + allow(Yast::Mode).to receive(:commandline).and_return true expect(subject.send(:full_screen)).to eq false end # TODO: better description, but why it check this widget? it "returns if there is progress replace point" do + allow(Yast::Mode).to receive(:commandline).and_return false ui = double(WidgetExists: true) stub_const("Yast::UI", ui) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/library/wizard/src/modules/Wizard.rb new/yast2-3.1.144/library/wizard/src/modules/Wizard.rb --- old/yast2-3.1.142/library/wizard/src/modules/Wizard.rb 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/library/wizard/src/modules/Wizard.rb 2015-08-03 18:42:35.000000000 +0200 @@ -66,9 +66,7 @@ @icon_dir = File.join(Directory.themedir, "current", "icons", "22x22", "apps") - default_icon_path = File.join(@icon_dir, "yast.png") - - UI.SetApplicationIcon(default_icon_path) + @icon_name = "yast" end def haveFancyUI @@ -421,6 +419,8 @@ # def OpenDialog(dialog) dialog = deep_copy(dialog) + + set_icon UI.OpenDialog(Opt(:wizardDialog), dialog) if ! @relnotes_button_id.empty? ShowReleaseNotesButton(@relnotes_button_label, @relnotes_button_id) @@ -434,16 +434,13 @@ # def OpenNextBackDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - :back, - Label.BackButton, - :abort, - Label.AbortButton, - :next, - Label.NextButton - ) + open_wizard_dialog( + :back, + Label.BackButton, + :abort, + Label.AbortButton, + :next, + Label.NextButton ) else OpenDialog(NextBackDialog()) @@ -458,16 +455,13 @@ # def OpenAcceptDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - :no_back_button, - "", - :cancel, - Label.CancelButton, - :accept, - Label.AcceptButton - ) + open_wizard_dialog( + :no_back_button, + "", + :cancel, + Label.CancelButton, + :accept, + Label.AcceptButton ) # Don't let sloppy calls to Wizard::SetContents() disable this button by accident @@ -485,16 +479,13 @@ # def OpenOKDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - :no_back_button, - "", - :cancel, - Label.CancelButton, - :ok, - Label.OKButton - ) + open_wizard_dialog( + :no_back_button, + "", + :cancel, + Label.CancelButton, + :ok, + Label.OKButton ) # Don't let sloppy calls to Wizard::SetContents() disable this button by accident @@ -512,16 +503,13 @@ # def OpenAbortApplyFinishDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - :apply, - _("&Apply"), - :abort, - Label.AbortButton, - :finish, - Label.FinishButton - ) + open_wizard_dialog( + :apply, + _("&Apply"), + :abort, + Label.AbortButton, + :finish, + Label.FinishButton ) else OpenDialog(GenericDialog(AbortApplyFinishButtonBox())) @@ -535,17 +523,14 @@ # def OpenAcceptStepsDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - Opt(:stepsEnabled), - :no_back_button, - "", - :cancel, - Label.CancelButton, - :accept, - Label.AcceptButton - ) + open_wizard_dialog( + Opt(:stepsEnabled), + :no_back_button, + "", + :cancel, + Label.CancelButton, + :accept, + Label.AcceptButton ) # Don't let sloppy calls to Wizard::SetContents() disable this button by accident @@ -561,17 +546,14 @@ # def OpenAcceptAbortStepsDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - Opt(:stepsEnabled), - :no_back_button, - "", - :abort, - Label.AbortButton, - :accept, - Label.AcceptButton - ) + open_wizard_dialog( + Opt(:stepsEnabled), + :no_back_button, + "", + :abort, + Label.AbortButton, + :accept, + Label.AcceptButton ) # Don't let sloppy calls to Wizard::SetContents() disable this button by accident @@ -587,17 +569,14 @@ # def OpenNextBackStepsDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - Opt(:stepsEnabled), - :back, - Label.BackButton, - :abort, - Label.AbortButton, - :next, - Label.NextButton - ) + open_wizard_dialog( + Opt(:stepsEnabled), + :back, + Label.BackButton, + :abort, + Label.AbortButton, + :next, + Label.NextButton ) else OpenNextBackDialog() @@ -611,17 +590,14 @@ # the installation visual design def OpenLeftTitleNextBackDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - Opt(:titleOnLeft), - :back, - Label.BackButton, - :abort, - Label.AbortButton, - :next, - Label.NextButton - ) + open_wizard_dialog( + Opt(:titleOnLeft), + :back, + Label.BackButton, + :abort, + Label.AbortButton, + :next, + Label.NextButton ) else OpenNextBackDialog() @@ -653,6 +629,7 @@ button_box = deep_copy(button_box) button_box = BackAbortNextButtonBox() if button_box.nil? + set_icon UI.OpenDialog(Opt(:wizardDialog), GenericDialog(button_box)) if !help_space_contents.nil? @@ -998,16 +975,13 @@ # def OpenCancelOKDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - :back, - Label.BackButton, - :abort, - Label.CancelButton, - :next, - Label.OKButton - ) + open_wizard_dialog( + :back, + Label.BackButton, + :abort, + Label.CancelButton, + :next, + Label.OKButton ) HideBackButton() else @@ -1192,9 +1166,8 @@ return false unless icon - icon_path = File.join(@icon_path, icon + ".png") - - UI.SetApplicationIcon(icon_path) + @icon_name = icon + set_icon true end @@ -1510,17 +1483,14 @@ # def OpenTreeNextBackDialog if haveFancyUI - UI.OpenDialog( - Opt(:wizardDialog), - Wizard( - Opt(:treeEnabled), - :back, - Label.BackButton, - :abort, - Label.AbortButton, - :next, - Label.NextButton - ) + open_wizard_dialog( + Opt(:treeEnabled), + :back, + Label.BackButton, + :abort, + Label.AbortButton, + :next, + Label.NextButton ) else OpenDialog(GenericTreeDialog(BackAbortNextButtonBox())) @@ -1881,6 +1851,27 @@ publish function: :AddMenuEntry, type: "list <map> (list <map>, string, string, string)" publish function: :CreateMenu, type: "void (list <map>)" publish function: :SetProductName, type: "void (string)" + + protected + + # Sets the icon and opens a wizard dialog with the content specified as + # arguments + def open_wizard_dialog(*args) + set_icon + UI.OpenDialog( + Opt(:wizardDialog), + Wizard(*args) + ) + end + + # Sets the application icon according to the value of @icon_name + # + # This should be called only immediately before opening a dialog; premature + # UI calls can interfere with the CommandLine mode. + def set_icon + icon_path = File.join(@icon_dir, "#{@icon_name}.png") + UI.SetApplicationIcon(icon_path) + end end Wizard = WizardClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/package/yast2.changes new/yast2-3.1.144/package/yast2.changes --- old/yast2-3.1.142/package/yast2.changes 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/package/yast2.changes 2015-08-03 18:42:35.000000000 +0200 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Mon Aug 3 14:29:05 UTC 2015 - [email protected] + +- Fixed a conflict between Wizard and CommandLine components that + was breaking the CLI for some modules (bnc#940341) +- 3.1.144 + +------------------------------------------------------------------- +Tue Jul 28 10:50:05 UTC 2015 - [email protected] + +- Properly display information about exceptions when running in + command line mode (bnc#939565). +- Fixed a bug preventing Yast::CommandLine to be executed twice + in the same script. +- 3.1.143 + +------------------------------------------------------------------- Tue Jul 21 14:44:04 UTC 2015 - [email protected] - Allow Dialog class to support alternative ways how to get user diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/package/yast2.spec new/yast2-3.1.144/package/yast2.spec --- old/yast2-3.1.142/package/yast2.spec 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/package/yast2.spec 2015-08-03 18:42:35.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.142 +Version: 3.1.144 Release: 0 Url: https://github.com/yast/yast-yast2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.142/test/test_helper.rb new/yast2-3.1.144/test/test_helper.rb --- old/yast2-3.1.142/test/test_helper.rb 2015-07-22 11:51:37.000000000 +0200 +++ new/yast2-3.1.144/test/test_helper.rb 2015-08-03 18:42:35.000000000 +0200 @@ -3,7 +3,9 @@ # Y2DIRs location needed for testing purpose ADDITIONAL_Y2DIRS = [ # Needed to test Y2DIR support in Yast::Directory - "#{root_location}/library/general/test" + "#{root_location}/library/general/test", + # Needed to test Yast::CommandLine usage from a dummy client + "#{root_location}/library/commandline/test" ] inc_dirs.concat(ADDITIONAL_Y2DIRS) ENV["Y2DIR"] = inc_dirs.join(":")
