Hello community, here is the log from the commit of package yast2 for openSUSE:Leap:15.2 checked in at 2020-01-17 11:58:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/yast2 (Old) and /work/SRC/openSUSE:Leap:15.2/.yast2.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2" Fri Jan 17 11:58:59 2020 rev:170 rq:764556 version:4.2.54 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/yast2/yast2.changes 2020-01-15 16:32:04.904877097 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.yast2.new.26092/yast2.changes 2020-01-17 11:59:00.696439895 +0100 @@ -1,0 +2,35 @@ +Fri Jan 10 14:43:20 UTC 2020 - [email protected] + +- Do not refresh package installation overview if the medium has + been changed and the user has switched to the release notes tab. + (bsc#1129426, bsc#1159367) +- 4.2.54 + +------------------------------------------------------------------- +Fri Jan 10 13:43:20 UTC 2020 - Ancor Gonzalez Sosa <[email protected]> + +- Fixed error during upgrade if Btrfs is used and '/var/lib/YaST2' + is missing (bsc#1159562) +- 4.2.53 + +------------------------------------------------------------------- +Fri Jan 10 09:04:16 UTC 2020 - Martin Vidner <[email protected]> + +- Propagate an error status when a CommandLine module gets an + unknown command (related to bsc#1144351). +- 4.2.52 + +------------------------------------------------------------------- +Wed Jan 8 16:27:59 UTC 2020 - Ancor Gonzalez Sosa <[email protected]> + +- Fix an exception in the live installation caused by a missing + "require" clause (bsc#1160362). +- 4.2.51 + +------------------------------------------------------------------- +Mon Jan 6 15:03:45 UTC 2020 - Ladislav Slezák <[email protected]> + +- Persian is also an RTL language (related to bsc#1156437) +- 4.2.50 + +------------------------------------------------------------------- Old: ---- yast2-4.2.49.tar.bz2 New: ---- yast2-4.2.54.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.NASU0E/_old 2020-01-17 11:59:01.028440040 +0100 +++ /var/tmp/diff_new_pack.NASU0E/_new 2020-01-17 11:59:01.028440040 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2 # -# 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 -Version: 4.2.49 +Version: 4.2.54 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only @@ -117,8 +117,8 @@ Conflicts: yast2-installation < 4.2.9 # moved cfg_mail.scr Conflicts: yast2-mail < 3.1.7 -# Older packager use removed API -Conflicts: yast2-packager < 4.0.33 +# Older packager use removed API e.g. user_switched_to_details +Conflicts: yast2-packager < 4.2.44 # Older snapper does not provide machine-readable output Conflicts: snapper < 0.8.6 ++++++ yast2-4.2.49.tar.bz2 -> yast2-4.2.54.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/commandline/src/modules/CommandLine.rb new/yast2-4.2.54/library/commandline/src/modules/CommandLine.rb --- old/yast2-4.2.49/library/commandline/src/modules/CommandLine.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/commandline/src/modules/CommandLine.rb 2020-01-14 09:28:04.000000000 +0100 @@ -360,7 +360,7 @@ # translators: error message in command line interface Error(Builtins.sformat(_("Unknown Command: %1"), command)) - return { "command" => command } + return {} end # build the list of options for the command diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/commandline/test/commandline_test.rb new/yast2-4.2.54/library/commandline/test/commandline_test.rb --- old/yast2-4.2.49/library/commandline/test/commandline_test.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/commandline/test/commandline_test.rb 2020-01-14 09:28:04.000000000 +0100 @@ -4,6 +4,10 @@ Yast.import "CommandLine" +# If these test fail (or succeed) in mysterious ways then it may be +# wfm.rb eagerly rescuing a RSpec::Mocks::MockExpectationError +# (fixed meanwhile in ruby-bindings). In such cases see the y2log. + describe Yast::CommandLine do # restore the original modes to not accidentally influence the other tests # (these tests change the UI mode to "commandline") @@ -38,4 +42,11 @@ Yast::WFM.CallFunction("dummy_cmdline", ["crash"]) end + + it "complains about unknown commands and returns false" do + expect(Yast::CommandLine).to receive(:Print).with(/Unknown Command:/) + expect(Yast::CommandLine).to receive(:Print).with(/Use.*help.*available commands/) + + expect(Yast::WFM.CallFunction("dummy_cmdline", ["unknowncommand"])).to eq false + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/general/src/lib/ui/text_helpers.rb new/yast2-4.2.54/library/general/src/lib/ui/text_helpers.rb --- old/yast2-4.2.49/library/general/src/lib/ui/text_helpers.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/general/src/lib/ui/text_helpers.rb 2020-01-14 09:28:04.000000000 +0100 @@ -72,7 +72,8 @@ def div_with_direction(text, lang = nil) Yast.import "Language" lang ||= Yast::Language.language - direction = lang.start_with?("ar", "he") ? "rtl" : "ltr" + # RTL languages: Arabic, Persian, Hebrew + direction = lang.start_with?("ar", "fa", "he") ? "rtl" : "ltr" "<div dir=\"#{direction}\">#{text}</div>" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/packages/src/lib/y2packager/product_reader.rb new/yast2-4.2.54/library/packages/src/lib/y2packager/product_reader.rb --- old/yast2-4.2.49/library/packages/src/lib/y2packager/product_reader.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/packages/src/lib/y2packager/product_reader.rb 2020-01-14 09:28:04.000000000 +0100 @@ -14,6 +14,7 @@ require "y2packager/product" require "y2packager/product_sorter" require "y2packager/resolvable" +require "y2packager/product_control_product" Yast.import "Pkg" Yast.import "Linuxrc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/packages/src/modules/SlideShow.rb new/yast2-4.2.54/library/packages/src/modules/SlideShow.rb --- old/yast2-4.2.49/library/packages/src/modules/SlideShow.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/packages/src/modules/SlideShow.rb 2020-01-14 09:28:04.000000000 +0100 @@ -110,6 +110,8 @@ class SlideShowClass < Module include Yast::Logger + attr_accessor :user_switched_to + module UI_ID TOTAL_PROGRESS = :progressTotal CURRENT_PACKAGE = :progressCurrentPackage @@ -138,11 +140,9 @@ @slide_interval = 30 # FIXME: constant @language = "en" @widgets_created = false - @user_switched_to_details = false + @user_switched_to = :none @opened_own_wizard = false @inst_log = "" - @debug = false - @user_abort = false # we need to remember the values for tab switching @@ -658,6 +658,7 @@ # # @param [Boolean] show_release_notes release notes tab will be shown. def RebuildDialog(show_release_notes = false) + log.info "Rebuilding partitioning/RPM_installation progress" contents = Empty() show_slides = Slides.HaveSlideSupport && Slides.HaveSlides @@ -726,6 +727,29 @@ nil end + # Redrawing the complete slide show if needed. + # + def Redraw + CheckForSlides() + + # do not rebuild if the user reads the release notes + return if @user_switched_to == :release_notes + + if Slides.HaveSlides && Slides.HaveSlideSupport + if !SlideShow.HaveSlideWidget + # (true) : Showing release tab if needed + RebuildDialog(true) + SwitchToDetailsView() if @user_switched_to == :details + end + + # Don't override explicit user request! + SwitchToSlideView() if @user_switched_to != :details + elsif !ShowingDetails() + # (true) : Showing release tab if needed + RebuildDialog(true) + end + end + # Open the slide show base dialog with empty work area (placeholder for # the image) and CD statistics. # @@ -778,22 +802,28 @@ button = deep_copy(button) if button == :showDetails && !ShowingDetails() Builtins.y2milestone("User asks to switch to details") - @user_switched_to_details = true + @user_switched_to = :details SwitchToDetailsView() elsif button == :showSlide && !ShowingSlide() if Slides.HaveSlides - @user_switched_to_details = false + if @user_switched_to == :release_notes + # The user is currently in the release notes tab. + # In order to not disturb him while reading the release notes + # we are not updating the tabs although the slide show has been + # changed in the background. + # Now the user is switching from release notes to slide show + # and we are updating the slide show now. + RebuildDialog(true) # true: showing the release tab + end SwitchToSlideView() LoadSlide(@current_slide_no) else UI.ChangeWidget(:dumbTab, :CurrentItem, :showDetails) end + @user_switched_to = :slides elsif @_rn_tabs.key?(button) && !ShowingRelNotes(button) - @user_switched_to_details = false + @user_switched_to = :release_notes SwitchToReleaseNotesView(button) - elsif button == :debugHotkey - @debug = !@debug - Builtins.y2milestone("Debug mode: %1", @debug) end # note: `abort is handled in SlideShowCallbacks::HandleInput() @@ -1028,10 +1058,8 @@ publish variable: :slide_interval, type: "integer" publish variable: :language, type: "string" publish variable: :widgets_created, type: "boolean" - publish variable: :user_switched_to_details, type: "boolean" publish variable: :opened_own_wizard, type: "boolean" publish variable: :inst_log, type: "string" - publish variable: :debug, type: "boolean" publish variable: :textmode, type: "boolean" publish variable: :display_width, type: "integer" publish variable: :relnotes, type: "string" @@ -1053,11 +1081,8 @@ publish function: :SetGlobalProgressLabel, type: "void (string)" publish function: :AppendMessageToInstLog, type: "void (string)" publish function: :HaveSlideWidget, type: "boolean ()" - publish function: :CheckForSlides, type: "void ()" publish function: :SetLanguage, type: "void (string)" publish function: :TableItem, type: "term (string, string, string, string, string)" - publish function: :SwitchToSlideView, type: "void ()" - publish function: :SwitchToDetailsView, type: "void ()" publish function: :SwitchToReleaseNotesView, type: "void (symbol)" publish function: :RebuildDialog, type: "void ()" publish function: :Reset, type: "void ()" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/packages/test/slide_show_test.rb new/yast2-4.2.54/library/packages/test/slide_show_test.rb --- old/yast2-4.2.49/library/packages/test/slide_show_test.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/packages/test/slide_show_test.rb 2020-01-14 09:28:04.000000000 +0100 @@ -3,6 +3,7 @@ require_relative "test_helper" Yast.import "SlideShow" +Yast.import "Slides" Yast.import "UI" describe "Yast::SlideShow" do @@ -146,4 +147,109 @@ expect(total_size).to eq(100) end end + + describe "#Redraw" do + before do + Yast::SlideShow.main + allow(Yast::SlideShow).to receive(:CheckForSlides) + end + context "user is reading release notes" do + it "does not redraw the page" do + Yast::SlideShow.user_switched_to = :release_notes + expect(Yast::SlideShow).not_to receive(:RebuildDialog) + Yast::SlideShow.Redraw() + end + end + context "no user input" do + before do + Yast::SlideShow.user_switched_to = :none + end + context "slideshow is available" do + before do + allow(Yast::Slides).to receive(:HaveSlides).and_return(true) + allow(Yast::Slides).to receive(:HaveSlideSupport).and_return(true) + end + it "shows slideshow" do + expect(Yast::SlideShow).to receive(:SwitchToSlideView) + Yast::SlideShow.Redraw() + end + end + context "slideshow is not available" do + it "redraws the page" do + expect(Yast::SlideShow).to receive(:RebuildDialog) + Yast::SlideShow.Redraw() + end + end + end + end + + describe "#HandleInput" do + before do + Yast::SlideShow.main + end + context "switching to details" do + before do + allow(Yast::SlideShow).to receive(:ShowingDetails).and_return(false) + end + it "switches to detail view" do + expect(Yast::SlideShow).to receive(:SwitchToDetailsView) + Yast::SlideShow.HandleInput(:showDetails) + end + it "saves user selection" do + Yast::SlideShow.HandleInput(:showDetails) + expect(Yast::SlideShow.user_switched_to).to eq(:details) + end + end + context "switching to slide show" do + before do + allow(Yast::SlideShow).to receive(:ShowingSlide).and_return(false) + allow(Yast::Slides).to receive(:HaveSlides).and_return(true) + end + context "release notes have been selected before" do + before do + Yast::SlideShow.user_switched_to = :release_notes + end + it "redraws the page" do + expect(Yast::SlideShow).to receive(:RebuildDialog) + Yast::SlideShow.HandleInput(:showSlide) + end + it "switches to slide show" do + expect(Yast::SlideShow).to receive(:SwitchToSlideView) + Yast::SlideShow.HandleInput(:showSlide) + end + end + context "release notes have NOT been selected before" do + before do + Yast::SlideShow.user_switched_to = :none + end + it "does not redraw the page" do + expect(Yast::SlideShow).not_to receive(:RebuildDialog) + Yast::SlideShow.HandleInput(:showSlide) + end + it "switches to slide show" do + expect(Yast::SlideShow).to receive(:SwitchToSlideView) + Yast::SlideShow.HandleInput(:showSlide) + end + end + it "saves user selection" do + Yast::SlideShow.HandleInput(:showSlide) + expect(Yast::SlideShow.user_switched_to).to eq(:slides) + end + end + context "switching to release notes" do + before do + allow(Yast::SlideShow).to receive(:ShowingRelNotes).and_return(false) + Yast::SlideShow.add_relnotes_for_product("Foo", :releaseNotesFoo, []) + end + it "switches to realease notes view" do + expect(Yast::SlideShow).to receive(:SwitchToReleaseNotesView) + Yast::SlideShow.HandleInput(:rn_Foo) + end + it "saves user selection" do + Yast::SlideShow.HandleInput(:rn_Foo) + expect(Yast::SlideShow.user_switched_to).to eq(:release_notes) + end + end + end + end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/packages/test/y2packager/product_reader_test.rb new/yast2-4.2.54/library/packages/test/y2packager/product_reader_test.rb --- old/yast2-4.2.49/library/packages/test/y2packager/product_reader_test.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/packages/test/y2packager/product_reader_test.rb 2020-01-14 09:28:04.000000000 +0100 @@ -216,6 +216,41 @@ expect(subject.all_products.size).to eq(1) end + + # Smoke test. There was a missing "require" clause in one part of the code. + # This context ensures that part is executed in the tests, basically to + # make sure the "require" is not forgotten (bsc#1160362). But the tests on + # this context do not guarantee the code is working correctly in all cases. + # They only test a simplistic case with quite some mocking. + context "with the online media and no base product" do + # FIXME: needed because MediumType is wrongly located in yast2-packager + module Y2Packager + class MediumType + def self.online? + true + end + end + end + + before do + allow(Yast::Stage).to receive(:initial).and_return true + + # The tests at test/y2packager/product_control_product_test.rb mock + # this to always be an array. Let's copy the most simplistic of those + # mocks. + allow(Yast::ProductFeatures).to receive(:GetFeature) + .with("software", "base_products").and_return([]) + end + + after do + # the read products are cached, we need to reset them manually for the next test + Y2Packager::ProductControlProduct.instance_variable_set(:@products, nil) + end + + it "does not crash" do + expect { subject.all_products }.to_not raise_error + end + end end describe ".installation_package_mapping" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/system/src/lib/yast2/fs_snapshot_store.rb new/yast2-4.2.54/library/system/src/lib/yast2/fs_snapshot_store.rb --- old/yast2-4.2.49/library/system/src/lib/yast2/fs_snapshot_store.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/system/src/lib/yast2/fs_snapshot_store.rb 2020-01-14 09:28:04.000000000 +0100 @@ -30,6 +30,12 @@ # @param[String] purpose of snapshot like "upgrade" # @raise[RuntimeError] if writing to file failed def self.save(purpose, snapshot_id) + # Ensure the directory is there (bsc#1159562) + Yast::SCR.Execute( + Yast::Path.new(".target.bash"), + "/bin/mkdir -p #{snapshot_dir_path}" + ) + result = Yast::SCR.Write( Yast::Path.new(".target.string"), snapshot_path(purpose), @@ -61,7 +67,13 @@ # Path where is stored given purpose def self.snapshot_path(purpose) - path = "/var/lib/YaST2/pre_snapshot_#{purpose}.id" + ::File.join(snapshot_dir_path, "pre_snapshot_#{purpose}.id") + end + private_class_method :snapshot_path + + # Path of the directory where the ids of the snapshots are stored + def self.snapshot_dir_path + path = "/var/lib/YaST2" Yast.import "Stage" if Yast::Stage.initial && !Yast::WFM.scr_chrooted? @@ -71,6 +83,6 @@ path end - private_class_method :snapshot_path + private_class_method :snapshot_dir_path end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/library/system/test/fs_snapshot_store_test.rb new/yast2-4.2.54/library/system/test/fs_snapshot_store_test.rb --- old/yast2-4.2.49/library/system/test/fs_snapshot_store_test.rb 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/library/system/test/fs_snapshot_store_test.rb 2020-01-14 09:28:04.000000000 +0100 @@ -6,6 +6,11 @@ describe Yast2::FsSnapshotStore do describe ".save" do it "stores snapshot id to file identified by purpose" do + expect(Yast::SCR).to receive(:Execute).with( + path(".target.bash"), + "/bin/mkdir -p /var/lib/YaST2" + ) + expect(Yast::SCR).to receive(:Write).with( path(".target.string"), "/var/lib/YaST2/pre_snapshot_test.id", @@ -16,6 +21,8 @@ end it "raises exception if writing failed" do + allow(Yast::SCR).to receive(:Execute).with(path(".target.bash"), anything) + expect(Yast::SCR).to receive(:Write).with( path(".target.string"), "/var/lib/YaST2/pre_snapshot_test.id", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/package/yast2.changes new/yast2-4.2.54/package/yast2.changes --- old/yast2-4.2.49/package/yast2.changes 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/package/yast2.changes 2020-01-14 09:28:04.000000000 +0100 @@ -1,4 +1,39 @@ ------------------------------------------------------------------- +Fri Jan 10 14:43:20 UTC 2020 - [email protected] + +- Do not refresh package installation overview if the medium has + been changed and the user has switched to the release notes tab. + (bsc#1129426, bsc#1159367) +- 4.2.54 + +------------------------------------------------------------------- +Fri Jan 10 13:43:20 UTC 2020 - Ancor Gonzalez Sosa <[email protected]> + +- Fixed error during upgrade if Btrfs is used and '/var/lib/YaST2' + is missing (bsc#1159562) +- 4.2.53 + +------------------------------------------------------------------- +Fri Jan 10 09:04:16 UTC 2020 - Martin Vidner <[email protected]> + +- Propagate an error status when a CommandLine module gets an + unknown command (related to bsc#1144351). +- 4.2.52 + +------------------------------------------------------------------- +Wed Jan 8 16:27:59 UTC 2020 - Ancor Gonzalez Sosa <[email protected]> + +- Fix an exception in the live installation caused by a missing + "require" clause (bsc#1160362). +- 4.2.51 + +------------------------------------------------------------------- +Mon Jan 6 15:03:45 UTC 2020 - Ladislav Slezák <[email protected]> + +- Persian is also an RTL language (related to bsc#1156437) +- 4.2.50 + +------------------------------------------------------------------- Thu Dec 19 14:51:23 UTC 2019 - Knut Anderssen <[email protected]> - Yast2::ServiceWidget: By default, propose to reload or restart diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.2.49/package/yast2.spec new/yast2-4.2.54/package/yast2.spec --- old/yast2-4.2.49/package/yast2.spec 2019-12-19 15:11:34.000000000 +0100 +++ new/yast2-4.2.54/package/yast2.spec 2020-01-14 09:28:04.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.2.49 +Version: 4.2.54 Release: 0 Summary: YaST2 Main Package License: GPL-2.0-only @@ -117,8 +117,8 @@ Conflicts: yast2-installation < 4.2.9 # moved cfg_mail.scr Conflicts: yast2-mail < 3.1.7 -# Older packager use removed API -Conflicts: yast2-packager < 4.0.33 +# Older packager use removed API e.g. user_switched_to_details +Conflicts: yast2-packager < 4.2.44 # Older snapper does not provide machine-readable output Conflicts: snapper < 0.8.6
