Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2018-04-26 13:28:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Thu Apr 26 13:28:54 2018 rev:425 rq:597095 version:4.0.71

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2018-04-07 
20:51:59.053406901 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2018-04-26 
13:28:56.540060962 +0200
@@ -1,0 +2,43 @@
+Mon Apr 16 13:47:10 UTC 2018 - igonzalezs...@suse.com
+
+- Do not crash when reading trying to determine available locales
+  for some licenses (bsc#1089610).
+- 4.0.71
+
+-------------------------------------------------------------------
+Mon Apr 16 14:48:27 CEST 2018 - snw...@suse.de
+
+- save_y2logs: save kernel messages and udev log (bsc#1089647,
+  bsc#1085212)
+- 4.0.70
+
+-------------------------------------------------------------------
+Thu Apr 12 13:38:26 UTC 2018 - igonzalezs...@suse.com
+
+- Handle input/output errors in the DoneProvide package callback
+  (bsc#1088682).
+- 4.0.69
+
+-------------------------------------------------------------------
+Thu Apr 12 12:01:49 UTC 2018 - knut.anders...@suse.com
+
+- Wizard: Fall back to smaller and/or hicolor icon if the icon for
+  the launched module cannot be found (bsc#1087224)
+- 4.0.68
+
+-------------------------------------------------------------------
+Tue Apr 10 11:38:23 UTC 2018 - lsle...@suse.cz
+
+- Do not use the solver for finding the best product upgrade
+  candidate, it does not work correctly in the SLES + sle-module-hpc
+  => SLES_HPC case (bsc#1086734)
+- 4.0.67
+
+-------------------------------------------------------------------
+Tue Apr 10 07:25:08 UTC 2018 - jreidin...@suse.com
+
+- Fix early exit of installation when initial install url is
+  invalid and later fixed (bsc#1086840)
+- 4.0.66
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.0.65.tar.bz2

New:
----
  yast2-4.0.71.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.AS9JUL/_old  2018-04-26 13:28:57.668019649 +0200
+++ /var/tmp/diff_new_pack.AS9JUL/_new  2018-04-26 13:28:57.672019503 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.0.65
+Version:        4.0.71
 Release:        0
 Summary:        YaST2 - Main Package
 License:        GPL-2.0

++++++ yast2-4.0.65.tar.bz2 -> yast2-4.0.71.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/cwm/src/modules/CWMServiceStart.rb 
new/yast2-4.0.71/library/cwm/src/modules/CWMServiceStart.rb
--- old/yast2-4.0.65/library/cwm/src/modules/CWMServiceStart.rb 2018-04-06 
14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/cwm/src/modules/CWMServiceStart.rb 2018-04-16 
16:35:04.000000000 +0200
@@ -21,16 +21,13 @@
 # you may find current contact information at www.novell.com
 #
 # ***************************************************************************
-# File:        modules/CWMServiceStart.ycp
-# Package:     Common widget manipulation, service start widget
-# Summary:     Routines for service start widget handling
-# Authors:     Jiri Srain <jsr...@suse.cz>
-#
-# $Id$
-#
+
 require "yast"
 
 module Yast
+  # Routines for service start widget handling.
+  #
+  # NOTE: a modern API for this is {::UI::ServiceStatus}
   class CWMServiceStartClass < Module
     def main
       Yast.import "UI"
@@ -274,6 +271,9 @@
 
     # Get the widget description map of the widget for service auto starting
     # settings
+    #
+    # NOTE: a modern API for this is {::UI::ServiceStatus}
+    #
     # @param [Hash{String => Object}] settings a map of all parameters needed 
to create the widget properly
     # <pre>
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/src/lib/y2packager/license.rb 
new/yast2-4.0.71/library/packages/src/lib/y2packager/license.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/license.rb     
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/license.rb     
2018-04-16 16:35:04.000000000 +0200
@@ -126,8 +126,9 @@
 
     # Return license's available locales
     #
-    # @return [String] List of available locales
+    # @return [Array<String>] List of available locales
     def locales
+      return [DEFAULT_LANG] unless fetcher
       fetcher.locales
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/src/lib/y2packager/product_reader.rb 
new/yast2-4.0.71/library/packages/src/lib/y2packager/product_reader.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/product_reader.rb      
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/product_reader.rb      
2018-04-16 16:35:04.000000000 +0200
@@ -27,15 +27,17 @@
       # This map contains the correspondence between products and the
       # installation package for each product.
       #
-      # The information is read only once and cached for further queries.
+      # The information is always read again. Reason is that that url can be 
invalid,
+      # but user fix it later. This way it cache invalid result. See 
bsc#1086840
+      # ProductReader instance cache it properly, but caching for installation 
life-time
+      # should be prevented.
       #
       # @return [Hash<String,String>] product name -> installation package name
       def installation_package_mapping
-        return @installation_package_mapping if @installation_package_mapping
         installation_packages = 
Yast::Pkg.PkgQueryProvides("system-installation()")
         log.info "Installation packages: #{installation_packages.inspect}"
 
-        @installation_package_mapping = {}
+        installation_package_mapping = {}
         installation_packages.each do |list|
           pkg_name = list.first
           # There can be more instances of same package in different version. 
We except that one
@@ -49,10 +51,10 @@
           # `system-installation() = <product_name>`
           product_name = 
install_provide["provides"][/system-installation\(\)\s*=\s*(\S+)/, 1]
           log.info "package #{pkg_name} install product #{product_name}"
-          @installation_package_mapping[product_name] = pkg_name
+          installation_package_mapping[product_name] = pkg_name
         end
 
-        @installation_package_mapping
+        installation_package_mapping
       end
     end
 
@@ -161,7 +163,7 @@
     end
 
     def installation_package_mapping
-      self.class.installation_package_mapping
+      @installation_package_mapping ||= self.class.installation_package_mapping
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/src/lib/y2packager/product_upgrade.rb 
new/yast2-4.0.71/library/packages/src/lib/y2packager/product_upgrade.rb
--- old/yast2-4.0.65/library/packages/src/lib/y2packager/product_upgrade.rb     
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/lib/y2packager/product_upgrade.rb     
2018-04-16 16:35:04.000000000 +0200
@@ -20,8 +20,8 @@
 
     Yast.import "Pkg"
 
-    # fallback mapping with upgraded products to handle some corner cases,
-    # maps installed products to a new base product
+    # mapping with upgraded products to handle some corner cases,
+    # maps installed products to a new available base product
     MAPPING = {
       # SLES12 + HPC module => SLESHPC15
       # (a bit tricky, the module became a new base product!)
@@ -33,7 +33,12 @@
       # SLED11 => SLED15
       ["SUSE_SLED"]              => "SLED",
       # SLES4SAP11 => SLES4SAP15
-      ["SUSE_SLES_SAP"]          => "SLES_SAP"
+      ["SUSE_SLES_SAP"]          => "SLES_SAP",
+      # (installed) openSUSE => (available) SLES,
+      # this one is used when openSUSE is not available, e.g. booting SLE 
medium
+      # (moreover the openSUSE medium should contain only one product so that
+      # product should be used unconditionally)
+      ["openSUSE"]               => "SLES"
     }.freeze
 
     class << self
@@ -44,19 +49,15 @@
       #  1) If there is only one available base product then just use it,
       #     there are no other options than to upgrade to this product.
       #
-      #  2) Let the solver to evaluate the product versions, their 
dependencies,
-      #     Obsoletes/Provides, ... and find the correct upgrade candidate.
+      #  2) TODO: Somehow evaluate the available and installed products and
+      #     find the best upgrade candidate.
       #
-      #     However, this step is quite fragile as the solver evaluates *all*
-      #     packages, not just the products. That means the solver might fail
-      #     because of some unrelated package dependency issue and cannot
-      #     find the correct upgrade candidate. That's more likely when using
-      #     custom or 3rd party packages.
+      #     Note: We cannot use the solver here because it evaluates *all*
+      #     packages, not just the products. Moreover some products
+      #     (modules/extensions) might be added later which could change
+      #     the best upgrade candidate.
       #
-      #     If the solver fails then we try some fallback mechanisms for 
finding
-      #     the new product.
-      #
-      #  3) Use a harcoded fallback mapping with the list of installed products
+      #  3) Use a harcoded mapping with the list of installed products
       #     mapped to a new base product product. The static mapping is needed 
to
       #     handle some corner cases properly. This includes product renames or
       #     changing a module to a base product.
@@ -77,10 +78,6 @@
         product = find_by_count(available)
         return product if product
 
-        # found by solver?
-        product = find_by_solver
-        return product if product
-
         # found by hardcoded mapping?
         product = find_by_mapping(available)
         return product if product
@@ -102,31 +99,6 @@
         available.first
       end
 
-      # We do not know which available product might upgrade the installed 
product
-      # if the installation medium contains several products.
-      # Temporarily turn on the update mode to let the solver select the 
product for upgrade,
-      # this will correctly handle possible product renames specified via 
Obsoletes/Provides.
-      # @return [Y2Packager::Product,nil] the new upgraded product
-      def find_by_solver
-        # store the current resolvable states
-        Yast::Pkg.SaveState
-
-        # run the solver in the upgrade mode
-        Yast::Pkg.PkgUpdateAll({})
-        log_products
-
-        product = Y2Packager::Product.selected_base
-        # save the solver test case for easier debugging if no product upgrade 
was found
-        
Yast::Pkg.CreateSolverTestCase("/var/log/YaST2/solver-product-upgrade") unless 
product
-
-        # restore the original resolvable states
-        Yast::Pkg.RestoreState
-        log_products
-
-        log.info("Upgraded base product found by solver: #{product.inspect}")
-        product
-      end
-
       # find the upgrade product from the fallback mapping
       # @param available [Array<Y2Packager::Product>] the available base 
products
       # @return [Y2Packager::Product,nil] the new upgraded product
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/src/modules/PackageCallbacks.rb 
new/yast2-4.0.71/library/packages/src/modules/PackageCallbacks.rb
--- old/yast2-4.0.65/library/packages/src/modules/PackageCallbacks.rb   
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/src/modules/PackageCallbacks.rb   
2018-04-16 16:35:04.000000000 +0200
@@ -215,13 +215,23 @@
         return "C"
       end
 
-      # INVALID
-      if error == 3
+      # 
https://github.com/openSUSE/libzypp/blob/8dda46306f06440e1acaefb36fb60f6ce909fd42/zypp/ZYppCallbacks.h#L106
+      message =
+        case error
+        when 1
+          # NOT_FOUND (error = 1) is handled via MediaChange callback.
+          nil
+        when 2
+          Builtins.sformat(_("Package %1 could not be downloaded (input/output 
error)."), name)
+        when 3
+          Builtins.sformat(_("Package %1 is broken, integrity check has 
failed."), name)
+        else
+          log.warn "DoneProvide: unknown error '#{error}'"
+        end
+
+      # IO/INVALID
+      if message
         # error message, %1 is a package name
-        message = Builtins.sformat(
-          _("Package %1 is broken, integrity check has failed."),
-          name
-        )
 
         if Mode.commandline
           CommandLine.Print(message)
@@ -286,9 +296,8 @@
             if @showLongInfo
               error_symbol = "ERROR"
 
-              if error == 1
-                error_symbol = "NOT_FOUND"
-              elsif error == 2
+              # 
https://github.com/openSUSE/libzypp/blob/8dda46306f06440e1acaefb36fb60f6ce909fd42/zypp/ZYppCallbacks.h#L106
+              if error == 2
                 error_symbol = "IO"
               elsif error == 3
                 error_symbol = "INVALID"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/test/package_callbacks_test.rb 
new/yast2-4.0.71/library/packages/test/package_callbacks_test.rb
--- old/yast2-4.0.65/library/packages/test/package_callbacks_test.rb    
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/package_callbacks_test.rb    
2018-04-16 16:35:04.000000000 +0200
@@ -253,4 +253,82 @@
       end
     end
   end
+
+  describe "#DoneProvide" do
+    let(:error) { 2 }
+    let(:reason) { "Some reason" }
+    let(:name) { "yast2-packager" }
+    let(:user_input) { [:abort] }
+
+    before do
+      allow(Yast::UI).to receive(:UserInput).and_return(*user_input)
+    end
+
+    context "when error is 2 (IO)" do
+      let(:error) { 2 }
+
+      it "reports the error to the user" do
+        expect(subject).to receive(:layout_popup)
+          .with(/Package yast2-packager could not be downloaded/, *any_args)
+        subject.DoneProvide(error, reason, name)
+      end
+    end
+
+    context "when error is 3 (INVALID)" do
+      let(:error) { 3 }
+
+      it "reports the error to the user" do
+        expect(subject).to receive(:layout_popup)
+          .with(/Package yast2-packager is broken/, *any_args)
+        subject.DoneProvide(error, reason, name)
+      end
+    end
+
+    context "when error is unknown" do
+      let(:error) { 256 }
+
+      it "returns 'I'" do
+        expect(subject.DoneProvide(error, reason, name)).to eq("I")
+      end
+
+      it "logs the unknown error code" do
+        expect(subject.log).to receive(:warn).with("DoneProvide: unknown error 
'256'")
+        subject.DoneProvide(error, reason, name)
+      end
+    end
+
+    context "when user asks to abort" do
+      let(:user_input) { [:abort] }
+
+      it "returns 'C'" do
+        expect(subject.DoneProvide(error, reason, name)).to eq("C")
+      end
+    end
+
+    context "when user asks to retry" do
+      let(:user_input) { [:retry] }
+
+      it "returns 'R'" do
+        expect(subject.DoneProvide(error, reason, name)).to eq("R")
+      end
+    end
+
+    context "when user asks to ignore" do
+      let(:user_input) { [:ignore] }
+
+      it "returns 'I'" do
+        expect(subject.DoneProvide(error, reason, name)).to eq("I")
+      end
+    end
+
+    context "when the user asks to show more details" do
+      let(:user_input) { [:show, :ignore] }
+
+      it "shows the reason" do
+        allow(subject).to receive(:show_log_info).and_return(true)
+        expect(subject).to receive(:RichText).with(anything, /#{reason}/)
+        subject.DoneProvide(error, reason, name)
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/test/y2packager/license_test.rb 
new/yast2-4.0.71/library/packages/test/y2packager/license_test.rb
--- old/yast2-4.0.65/library/packages/test/y2packager/license_test.rb   
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/y2packager/license_test.rb   
2018-04-16 16:35:04.000000000 +0200
@@ -169,6 +169,14 @@
     it "returns list of available translations for the license" do
       expect(license.locales).to eq(["en_US", "cz_CZ"])
     end
+
+    context "when the license was initialized using some content" do
+      subject(:license) { Y2Packager::License.new(content: "Some content") }
+
+      it "returns a list containing the default language" do
+        expect(license.locales).to eq([described_class::DEFAULT_LANG])
+      end
+    end
   end
 
   describe "#accept!" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.0.65/library/packages/test/y2packager/product_upgrade_test.rb 
new/yast2-4.0.71/library/packages/test/y2packager/product_upgrade_test.rb
--- old/yast2-4.0.65/library/packages/test/y2packager/product_upgrade_test.rb   
2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/packages/test/y2packager/product_upgrade_test.rb   
2018-04-16 16:35:04.000000000 +0200
@@ -6,12 +6,6 @@
 require "y2packager/product"
 
 describe Y2Packager::ProductUpgrade do
-  before do
-    allow(Yast::Pkg).to receive(:SaveState)
-    allow(Yast::Pkg).to receive(:RestoreState)
-    allow(Yast::Pkg).to receive(:CreateSolverTestCase)
-  end
-
   let(:product1) { Y2Packager::Product.new(name: "testing_product1") }
   let(:product2) { Y2Packager::Product.new(name: "testing_product2") }
   let(:product3) { Y2Packager::Product.new(name: "testing_product3") }
@@ -25,11 +19,6 @@
       it "returns nil" do
         expect(described_class.new_base_product).to be_nil
       end
-
-      it "does not run the solver" do
-        expect(Yast::Pkg).to_not receive(:PkgUpdateAll)
-        described_class.new_base_product
-      end
     end
 
     context "only one base product is available" do
@@ -41,77 +30,45 @@
       it "returns that product" do
         expect(described_class.new_base_product).to be(product1)
       end
-
-      it "does not run the solver" do
-        expect(Yast::Pkg).to_not receive(:PkgUpdateAll)
-        described_class.new_base_product
-      end
     end
 
     context "several base products are available" do
+      let(:sles) { Y2Packager::Product.new(name: "SLES") }
+      let(:sles_hpc) { Y2Packager::Product.new(name: "SLES_HPC") }
+      let(:hpc_module) { Y2Packager::Product.new(name: "sle-module-hpc") }
+      let(:sles11) { Y2Packager::Product.new(name: "SUSE_SLES") }
+
       before do
-        allow(Yast::Pkg).to receive(:PkgUpdateAll)
+        expect(Y2Packager::Product).to receive(:available_base_products)
+          .and_return([product1, product2, sles, sles_hpc]).at_least(:once)
       end
 
-      context "solver selects a product" do
-        before do
-          expect(Y2Packager::Product).to receive(:available_base_products)
-            .and_return([product1, product2, product3]).at_least(:once)
-          allow(Yast::Pkg).to receive(:ResolvableProperties)
-            .and_return(["name" => product1.name, "status" => 
:selected]).at_least(:once)
-        end
-
-        it "runs the solver" do
-          expect(Yast::Pkg).to receive(:PkgUpdateAll)
-          described_class.new_base_product
+      context "the new base product is found in the fallback mapping" do
+        it "returns SLES for SLES11" do
+          expect(Y2Packager::Product).to 
receive(:installed_products).and_return([sles11])
+          expect(described_class.new_base_product).to be(sles)
         end
 
-        it "returns the selected product" do
-          expect(Yast::Pkg).to receive(:ResolvableProperties)
-            .and_return(["name" => product1.name, "status" => 
:selected]).at_least(:once)
-          expect(described_class.new_base_product).to be(product1)
+        it "returns SLES_HPC for SLES and HPC module installed" do
+          expect(Y2Packager::Product).to receive(:installed_products)
+            .and_return([sles, hpc_module])
+          expect(described_class.new_base_product).to be(sles_hpc)
         end
       end
 
-      # the solver might fail because of some dependency issues
-      context "the solver does not select any base product to install" do
-        let(:sles) { Y2Packager::Product.new(name: "SLES") }
-        let(:sles_hpc) { Y2Packager::Product.new(name: "SLES_HPC") }
-        let(:hpc_module) { Y2Packager::Product.new(name: "sle-module-hpc") }
-        let(:sles11) { Y2Packager::Product.new(name: "SUSE_SLES") }
-
-        before do
-          expect(Y2Packager::Product).to receive(:available_base_products)
-            .and_return([product1, product2, sles, sles_hpc]).at_least(:once)
-        end
-
-        context "the new base product is found in the fallback mapping" do
-          it "returns SLES for SLES11" do
-            expect(Y2Packager::Product).to 
receive(:installed_products).and_return([sles11])
-            expect(described_class.new_base_product).to be(sles)
-          end
-
-          it "returns SLES_HPC for SLES and HPC module installed" do
-            expect(Y2Packager::Product).to receive(:installed_products)
-              .and_return([sles, hpc_module])
-            expect(described_class.new_base_product).to be(sles_hpc)
-          end
-        end
-
-        context "the base product if found by name" do
-          it "returns SLES for installed SLES" do
-            expect(Y2Packager::Product).to receive(:installed_base_product)
-              .and_return(sles)
-            expect(described_class.new_base_product).to be(sles)
-          end
-        end
-
-        it "returns nil if no upgrade product is found" do
+      context "the base product if found by name" do
+        it "returns SLES for installed SLES" do
           expect(Y2Packager::Product).to receive(:installed_base_product)
-            .and_return(product3)
-          expect(described_class.new_base_product).to be_nil
+            .and_return(sles)
+          expect(described_class.new_base_product).to be(sles)
         end
       end
+
+      it "returns nil if no upgrade product is found" do
+        expect(Y2Packager::Product).to receive(:installed_base_product)
+          .and_return(product3)
+        expect(described_class.new_base_product).to be_nil
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.65/library/wizard/src/modules/Wizard.rb 
new/yast2-4.0.71/library/wizard/src/modules/Wizard.rb
--- old/yast2-4.0.65/library/wizard/src/modules/Wizard.rb       2018-04-06 
14:48:24.000000000 +0200
+++ new/yast2-4.0.71/library/wizard/src/modules/Wizard.rb       2018-04-16 
16:35:04.000000000 +0200
@@ -32,6 +32,9 @@
 
 module Yast
   class WizardClass < Module
+    DEFAULT_ICON_NAME = "yast".freeze
+    FALLBACK_ICON_DIR = "/usr/share/icon/hicolor".freeze
+
     def main
       Yast.import "UI"
       textdomain "base"
@@ -64,9 +67,8 @@
       @relnotes_button_label = ""
       @relnotes_button_id = ""
 
-      @icon_dir = File.join(Directory.themedir, "current", "icons",
-        "64x64", "apps")
-      @icon_name = "yast"
+      # Current icon name to set.
+      @icon_name = DEFAULT_ICON_NAME
     end
 
     def haveFancyUI
@@ -1158,17 +1160,13 @@
     #  SetDesktopIcon ("lan")
     def SetDesktopIcon(file)
       description = Desktop.ParseSingleDesktopFile(file)
-
       return false unless description
 
-      icon = description["icon"]
-
-      return false unless icon
+      icon = description["Icon"].to_s
+      return false if icon.empty?
 
       @icon_name = icon
       set_icon
-
-      true
     end
 
     # Convenience function to avoid 2 calls if application needs to set
@@ -1193,7 +1191,6 @@
 
       Builtins.y2debug("Set dialog title: %1", name)
       SetDialogTitle(name)
-
       SetDesktopIcon(file)
 
       Builtins.haskey(description, "Name")
@@ -1867,9 +1864,31 @@
     #
     # This should be called only immediately before opening a dialog; premature
     # UI calls can interfere with the CommandLine mode.
+    #
+    # @return [Boolean] true if the application icon was set; false otherwise
     def set_icon
-      icon_path = File.join(@icon_dir, "#{@icon_name}.png")
+      icon_path = paths_for(@icon_name).first.to_s
+
+      if icon_path.empty?
+        Builtins.y2warning("Cannot set application icon to \"%1.png\"", 
@icon_name)
+        @icon_name = DEFAULT_ICON_NAME
+        return false
+      end
+
       UI.SetApplicationIcon(icon_path)
+      true
+    end
+
+    # Convenience method that returns all the available icon paths for a given
+    # icon name
+    #
+    # @param name [String] icon name
+    # @return [Array<String>] list with the available icon paths
+    def paths_for(icon_name)
+      icon_dirs = "{#{Directory.icondir}, #{FALLBACK_ICON_DIR}}"
+      sizes = "{64x64,48x48,32x32,22x22,16x16}"
+
+      Dir.glob(File.join(icon_dirs, sizes, "apps", "#{icon_name}.png"))
     end
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.65/package/yast2.changes 
new/yast2-4.0.71/package/yast2.changes
--- old/yast2-4.0.65/package/yast2.changes      2018-04-06 14:48:24.000000000 
+0200
+++ new/yast2-4.0.71/package/yast2.changes      2018-04-16 16:35:04.000000000 
+0200
@@ -1,4 +1,47 @@
 -------------------------------------------------------------------
+Mon Apr 16 13:47:10 UTC 2018 - igonzalezs...@suse.com
+
+- Do not crash when reading trying to determine available locales
+  for some licenses (bsc#1089610).
+- 4.0.71
+
+-------------------------------------------------------------------
+Mon Apr 16 14:48:27 CEST 2018 - snw...@suse.de
+
+- save_y2logs: save kernel messages and udev log (bsc#1089647,
+  bsc#1085212)
+- 4.0.70
+
+-------------------------------------------------------------------
+Thu Apr 12 13:38:26 UTC 2018 - igonzalezs...@suse.com
+
+- Handle input/output errors in the DoneProvide package callback
+  (bsc#1088682).
+- 4.0.69
+
+-------------------------------------------------------------------
+Thu Apr 12 12:01:49 UTC 2018 - knut.anders...@suse.com
+
+- Wizard: Fall back to smaller and/or hicolor icon if the icon for
+  the launched module cannot be found (bsc#1087224)
+- 4.0.68
+
+-------------------------------------------------------------------
+Tue Apr 10 11:38:23 UTC 2018 - lsle...@suse.cz
+
+- Do not use the solver for finding the best product upgrade
+  candidate, it does not work correctly in the SLES + sle-module-hpc
+  => SLES_HPC case (bsc#1086734)
+- 4.0.67
+
+-------------------------------------------------------------------
+Tue Apr 10 07:25:08 UTC 2018 - jreidin...@suse.com
+
+- Fix early exit of installation when initial install url is
+  invalid and later fixed (bsc#1086840)
+- 4.0.66
+
+-------------------------------------------------------------------
 Fri Apr  6 09:19:55 UTC 2018 - jreidin...@suse.com
 
 - improve wayland support (bsc#1083907)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.65/package/yast2.spec 
new/yast2-4.0.71/package/yast2.spec
--- old/yast2-4.0.65/package/yast2.spec 2018-04-06 14:48:24.000000000 +0200
+++ new/yast2-4.0.71/package/yast2.spec 2018-04-16 16:35:04.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2
-Version:        4.0.65
+Version:        4.0.71
 Release:        0
 Summary:        YaST2 - Main Package
 License:        GPL-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.65/scripts/save_y2logs 
new/yast2-4.0.71/scripts/save_y2logs
--- old/yast2-4.0.65/scripts/save_y2logs        2018-04-06 14:48:24.000000000 
+0200
+++ new/yast2-4.0.71/scripts/save_y2logs        2018-04-16 16:35:04.000000000 
+0200
@@ -118,6 +118,7 @@
   zypper.log zypp/history* pk_backend_zypp \
   pbl.log linuxrc.log wickedd.log \
   evms-engine.* \
+  boot.msg messages udev.log \
 '
 cd /var/log
 for i in $VAR_LOG_FILES ; do


Reply via email to