Hello community,

here is the log from the commit of package yast2 for openSUSE:Leap:15.2 checked 
in at 2020-02-10 16:41:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2 (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.yast2.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Mon Feb 10 16:41:16 2020 rev:172 rq:772183 version:4.2.64

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2/yast2.changes    2020-02-04 
17:55:02.084771558 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.yast2.new.26092/yast2.changes 2020-02-10 
16:41:23.307700581 +0100
@@ -1,0 +2,7 @@
+Tue Feb  4 14:15:37 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Show on WSL only WSL capable modules in control center
+  (bsc#1162650)
+- 4.2.64
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.2.63.tar.bz2

New:
----
  yast2-4.2.64.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.tBvNcg/_old  2020-02-10 16:41:23.695700855 +0100
+++ /var/tmp/diff_new_pack.tBvNcg/_new  2020-02-10 16:41:23.695700855 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.63
+Version:        4.2.64
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

++++++ yast2-4.2.63.tar.bz2 -> yast2-4.2.64.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.63/library/desktop/src/clients/menu.rb 
new/yast2-4.2.64/library/desktop/src/clients/menu.rb
--- old/yast2-4.2.63/library/desktop/src/clients/menu.rb        2020-01-31 
18:06:46.000000000 +0100
+++ new/yast2-4.2.64/library/desktop/src/clients/menu.rb        2020-02-04 
17:47:59.000000000 +0100
@@ -62,6 +62,7 @@
         "X-SuSE-YaST-Group",
         "X-SuSE-YaST-SortKey",
         "X-SuSE-YaST-RootOnly",
+        "X-SuSE-YaST-WSL",
         "Hidden"
       ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.63/library/desktop/src/modules/Desktop.rb 
new/yast2-4.2.64/library/desktop/src/modules/Desktop.rb
--- old/yast2-4.2.63/library/desktop/src/modules/Desktop.rb     2020-01-31 
18:06:46.000000000 +0100
+++ new/yast2-4.2.64/library/desktop/src/modules/Desktop.rb     2020-02-04 
17:47:59.000000000 +0100
@@ -32,6 +32,7 @@
     def main
       Yast.import "UI"
       textdomain "base"
+      Yast.import "Arch"
       Yast.import "Map"
       Yast.import "Directory"
 
@@ -111,7 +112,7 @@
     end
 
     # Read module and group data from desktop files
-    # @param [Array<String>] Values list of values to be parsed (empty to read 
all)
+    # @param [Array<String>] Values list of values to be parsed (empty or nil 
reads nothing)
     def Read(values_to_parse)
       values_to_parse = deep_copy(values_to_parse)
       extract_desktop_filename = lambda do |fullpath|
@@ -258,12 +259,11 @@
       end
 
       Builtins.foreach(mods) do |m|
-        if Builtins.haskey(@Modules, m) &&
-            Ops.get_string(@Modules, [m, "Hidden"], "false") != "true"
-          l = Builtins.add(
-            l,
-            Item(Id(m), Ops.get_string(@Modules, [m, "GenericName"], "???"))
-          )
+        if @Modules[m].is_a?(::Hash) &&
+            @Modules[m]["Hidden"] != "true" &&
+            # wsl specific whitelisting of modules
+            (!Arch.is_wsl || @Modules[m]["X-SuSE-YaST-WSL"] == "true")
+          l << Item(Id(m), Ops.get_string(@Modules, [m, "GenericName"], "???"))
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.63/library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.SWSingle.desktop
 
new/yast2-4.2.64/library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.SWSingle.desktop
--- 
old/yast2-4.2.63/library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.SWSingle.desktop
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-4.2.64/library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.SWSingle.desktop
  2020-02-04 17:47:59.000000000 +0100
@@ -0,0 +1,27 @@
+[Desktop Entry]
+X-SuSE-DocTeamID=ycc_org.opensuse.yast.SWSingle
+Type=Application
+Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software;
+
+X-KDE-ModuleType=Library
+X-KDE-HasReadOnlyMode=true
+X-SuSE-YaST-Call=sw_single
+
+X-SuSE-YaST-Group=Software
+X-SuSE-YaST-Argument=
+X-SuSE-YaST-RootOnly=true
+X-SuSE-YaST-WSL=true
+X-SuSE-YaST-AutoInst=
+X-SuSE-YaST-Geometry=
+X-SuSE-YaST-SortKey=20
+X-SuSE-YaST-AutoInstResource=
+X-SuSE-YaST-Keywords=software,packages,rpm,repositories,installation,deletion
+
+Icon=yast-sw_single
+Exec=xdg-su -c "/sbin/yast2 sw_single"
+
+Name=YaST Software Management
+GenericName=Software Management
+Comment=Install or remove software packages and manage software repositories
+StartupNotify=true
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.63/library/desktop/test/desktop_test.rb 
new/yast2-4.2.64/library/desktop/test/desktop_test.rb
--- old/yast2-4.2.63/library/desktop/test/desktop_test.rb       2020-01-31 
18:06:46.000000000 +0100
+++ new/yast2-4.2.64/library/desktop/test/desktop_test.rb       2020-02-04 
17:47:59.000000000 +0100
@@ -34,9 +34,58 @@
         "add-on"           => { "Name" => "YaST Add-On Products" },
         "lan"              => { "Name" => "YaST Network" },
         "services-manager" => { "Name" => "YaST Services Manager" },
+        "sw-single"        => { "Name" => "YaST Software Management" },
         "s390-extra"       => { "Name" => "YaST S390 Extra" },
         "dns-server"       => { "Name" => "YaST DNS Server" }
       )
     end
   end
+
+  describe ".ModuleList" do
+    around { |e| change_scr_root(DESKTOP_DATA_PATH, &e) }
+
+    let(:read_values) do
+      # TODO: really MEH API, copy of menu.rb list
+      [
+        "GenericName",
+        # not required: "Comment",
+        "X-SuSE-YaST-Argument",
+        "X-SuSE-YaST-Call",
+        "X-SuSE-YaST-Group",
+        "X-SuSE-YaST-SortKey",
+        "X-SuSE-YaST-RootOnly",
+        "X-SuSE-YaST-WSL",
+        "Hidden"
+      ]
+    end
+
+    before do
+      Yast::Desktop.Read(read_values)
+      # as changed scr does not have groups desktop, define it manually here
+      Yast::Desktop.Groups = { "Software" => { "modules" => ["add-on", 
"sw-single"] } }
+    end
+
+    context "on WSL" do
+      before do
+        allow(Yast::Arch).to receive(:is_wsl).and_return(true)
+      end
+
+      it "returns only whitelisted modules" do
+        expect(Yast::Desktop.ModuleList("Software")).to eq 
[Yast::Term.new(:item, Yast::Term.new(:id, "sw-single"), "Software Management")]
+      end
+    end
+
+    context "outside of WSL" do
+      before do
+        allow(Yast::Arch).to receive(:is_wsl).and_return(false)
+      end
+
+      it "ignores WSL whitelisting" do
+        expect(Yast::Desktop.ModuleList("Software")).to eq [
+          Yast::Term.new(:item, Yast::Term.new(:id, "sw-single"), "Software 
Management"),
+          Yast::Term.new(:item, Yast::Term.new(:id, "add-on"), "Add-On 
Products")
+        ]
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.63/package/yast2.changes 
new/yast2-4.2.64/package/yast2.changes
--- old/yast2-4.2.63/package/yast2.changes      2020-01-31 18:06:46.000000000 
+0100
+++ new/yast2-4.2.64/package/yast2.changes      2020-02-04 17:47:59.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Tue Feb  4 14:15:37 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Show on WSL only WSL capable modules in control center
+  (bsc#1162650)
+- 4.2.64
+
+-------------------------------------------------------------------
 Fri Jan 31 16:07:35 UTC 2020 - José Iván López González <jlo...@suse.com>
 
 - Add new widgets CWM::ProgressBar and CWM::DynamicProgressBar.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.63/package/yast2.spec 
new/yast2-4.2.64/package/yast2.spec
--- old/yast2-4.2.63/package/yast2.spec 2020-01-31 18:06:46.000000000 +0100
+++ new/yast2-4.2.64/package/yast2.spec 2020-02-04 17:47:59.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.63
+Version:        4.2.64
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only


Reply via email to