Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2015-10-20 16:22:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2015-08-31 22:57:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2015-10-20 16:22:06.000000000 +0200
@@ -1,0 +2,35 @@
+Fri Oct 16 08:21:20 UTC 2015 - lsle...@suse.cz
+
+- repository manager - properly close the main window when aborting
+  after failed initialization to avoid a segfault (bsc#950525)
+- 3.1.82
+
+-------------------------------------------------------------------
+Thu Oct  8 07:43:44 UTC 2015 - lsle...@suse.cz
+
+- repository manager - fixed switch between dvd:// and cd:// URL
+  scheme (bsc#947595)
+- 3.1.81
+
+-------------------------------------------------------------------
+Tue Oct  6 11:36:25 UTC 2015 - an...@suse.com
+
+- Repository editor can now manage urls with repo variables like
+  $arch, $releasever, etc. (bsc#944505)
+- 3.1.80
+
+-------------------------------------------------------------------
+Tue Oct  6 11:13:46 UTC 2015 - jreidin...@suse.com
+
+- Added a filter showing only those repositories not belonging to
+  any service. (bnc#944504)
+- 3.1.79
+
+-------------------------------------------------------------------
+Tue Sep 29 10:34:34 UTC 2015 - lsle...@suse.cz
+
+- handle properly the SLES11 SMT upgrade to SLES12 (evaluate all
+  removed products when checking product upgrades) (bsc#946717)
+- 3.1.78
+
+-------------------------------------------------------------------

Old:
----
  yast2-packager-3.1.77.tar.bz2

New:
----
  yast2-packager-3.1.82.tar.bz2

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.Lwv9eX/_old  2015-10-20 16:22:07.000000000 +0200
+++ /var/tmp/diff_new_pack.Lwv9eX/_new  2015-10-20 16:22:07.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.77
+Version:        3.1.82
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -36,14 +36,14 @@
 # HwDetection
 BuildRequires:  yast2 >= 3.1.19
 
-# "growonly" in Pkg::SetTargetDU()
-BuildRequires:  yast2-pkg-bindings >= 3.1.19
+# Pkg::SourceRawURL() and Pkg:ExpandedUrl()
+BuildRequires:  yast2-pkg-bindings >= 3.1.30
 
 # Newly added RPM
 Requires:       yast2-country-data >= 2.16.3
 
-# "growonly" in Pkg::SetTargetDU()
-Requires:       yast2-pkg-bindings >= 3.1.19
+# Pkg::SourceRawURL() and Pkg:ExpandedUrl()
+Requires:       yast2-pkg-bindings >= 3.1.30
 
 # Fixed .proc.cmdline agent
 Requires:       yast2 >= 3.1.89

++++++ yast2-packager-3.1.77.tar.bz2 -> yast2-packager-3.1.82.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/package/yast2-packager.changes 
new/yast2-packager-3.1.82/package/yast2-packager.changes
--- old/yast2-packager-3.1.77/package/yast2-packager.changes    2015-08-28 
15:58:16.000000000 +0200
+++ new/yast2-packager-3.1.82/package/yast2-packager.changes    2015-10-16 
10:38:09.000000000 +0200
@@ -1,4 +1,39 @@
 -------------------------------------------------------------------
+Fri Oct 16 08:21:20 UTC 2015 - lsle...@suse.cz
+
+- repository manager - properly close the main window when aborting
+  after failed initialization to avoid a segfault (bsc#950525)
+- 3.1.82
+
+-------------------------------------------------------------------
+Thu Oct  8 07:43:44 UTC 2015 - lsle...@suse.cz
+
+- repository manager - fixed switch between dvd:// and cd:// URL
+  scheme (bsc#947595)
+- 3.1.81
+
+-------------------------------------------------------------------
+Tue Oct  6 11:36:25 UTC 2015 - an...@suse.com
+
+- Repository editor can now manage urls with repo variables like
+  $arch, $releasever, etc. (bsc#944505)
+- 3.1.80
+
+-------------------------------------------------------------------
+Tue Oct  6 11:13:46 UTC 2015 - jreidin...@suse.com
+
+- Added a filter showing only those repositories not belonging to
+  any service. (bnc#944504)
+- 3.1.79
+
+-------------------------------------------------------------------
+Tue Sep 29 10:34:34 UTC 2015 - lsle...@suse.cz
+
+- handle properly the SLES11 SMT upgrade to SLES12 (evaluate all
+  removed products when checking product upgrades) (bsc#946717)
+- 3.1.78
+
+-------------------------------------------------------------------
 Fri Aug 28 13:39:23 UTC 2015 - lsle...@suse.cz
 
 - Do not show a warning for the removed SMT product when upgrading
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/package/yast2-packager.spec 
new/yast2-packager-3.1.82/package/yast2-packager.spec
--- old/yast2-packager-3.1.77/package/yast2-packager.spec       2015-08-28 
15:58:16.000000000 +0200
+++ new/yast2-packager-3.1.82/package/yast2-packager.spec       2015-10-16 
10:38:09.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.77
+Version:        3.1.82
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -35,14 +35,14 @@
 # HwDetection
 BuildRequires: yast2 >= 3.1.19
 
-# "growonly" in Pkg::SetTargetDU()
-BuildRequires: yast2-pkg-bindings >= 3.1.19
+# Pkg::SourceRawURL() and Pkg:ExpandedUrl()
+BuildRequires: yast2-pkg-bindings >= 3.1.30
 
 # Newly added RPM
 Requires:      yast2-country-data >= 2.16.3
 
-# "growonly" in Pkg::SetTargetDU()
-Requires:      yast2-pkg-bindings >= 3.1.19
+# Pkg::SourceRawURL() and Pkg:ExpandedUrl()
+Requires:      yast2-pkg-bindings >= 3.1.30
 
 # Fixed .proc.cmdline agent
 Requires: yast2 >= 3.1.89
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/src/clients/repositories.rb 
new/yast2-packager-3.1.82/src/clients/repositories.rb
--- old/yast2-packager-3.1.77/src/clients/repositories.rb       2015-08-28 
15:58:17.000000000 +0200
+++ new/yast2-packager-3.1.82/src/clients/repositories.rb       2015-10-16 
10:38:09.000000000 +0200
@@ -12,6 +12,9 @@
 #
 module Yast
   class RepositoriesClient < Client
+    NO_SERVICE = :no_service
+    NO_SERVICE_ITEM = :no_service_item
+
     def main
       Yast.import "Pkg"
       Yast.import "UI"
@@ -171,6 +174,7 @@
 
     def ReposFromService(service, input)
       input = deep_copy(input)
+      service = "" if service == NO_SERVICE
       Builtins.filter(input) do |repo|
         Ops.get_string(repo, "service", "") == service
       end
@@ -259,6 +263,7 @@
         "autorefresh"  => Ops.get_boolean(source, "autorefresh", true),
         "name"         => Ops.get_locale(source, "name", _("Unknown Name")),
         "url"          => Ops.get_string(generalData, "url", ""),
+        "raw_url"      => Ops.get_string(generalData, "raw_url", ""),
         "type"         => Ops.get_string(generalData, "type", ""),
         "priority"     => Ops.get_integer(source, "priority", 
@default_priority),
         "service"      => Ops.get_string(source, "service", ""),
@@ -309,9 +314,12 @@
       nil
     end
 
-    def repoInfoRichText(name, raw_url, category)
+    def repoInfoRichText(name, category, info)
+      url = info["url"]
+      raw_url = info["raw_url"]
+
       schema = Builtins.tolower(
-        Ops.get_string(URL.Parse(raw_url), "scheme", "")
+        Ops.get_string(URL.Parse(url), "scheme", "")
       )
       icon_tag = Ops.add(
         Ops.add(
@@ -323,15 +331,22 @@
         "\">&nbsp;&nbsp;&nbsp;"
       )
 
+      url = _("Unknown") if url == ""
       raw_url = _("Unknown") if raw_url == ""
 
-      url = Builtins.sformat(_("URL: %1"), raw_url)
+      url_string = Builtins.sformat(_("URL: %1"), url)
+      if url != raw_url
+        url_string += "<BR>"
+        # TRANSLATORS: Raw URL is the address without expanding repo variables
+        # e.g. Raw URL = http://something/$arch -> URL = 
http://something/x86_64
+        url_string += _("Raw URL: %s") % raw_url
+      end
 
       Builtins.sformat(
         "<P>%1<B><BIG>%2</BIG></B></P><P>%3<BR>%4</P>",
         icon_tag,
         name,
-        url,
+        url_string,
         category
       )
     end
@@ -390,7 +405,7 @@
         UI.ChangeWidget(
           Id(:repo_info),
           :Value,
-          repoInfoRichText(name, Ops.get_string(info, "url", ""), category)
+          repoInfoRichText(name, category, info)
         )
       end
 
@@ -641,10 +656,24 @@
             @displayed_service == Ops.get_string(srv_state, "alias", "")
         )
         ret = Builtins.add(ret, t)
-      end 
+      end
 
+      # there is some service, so allow to filter repos without service 
(bnc#944504)
+      if ret.size > 2
+        t = Item(
+          Id(NO_SERVICE_ITEM),
+          # TRANSLATORS: Item in selection box that allow user to see only
+          # repositories not associated with service. Sometimes called also
+          # third party as they are usually repositories not provided by SUSE
+          # within product subscription.
+          _("Only repositories not provided by a service"),
+          @repository_view &&
+            @displayed_service == NO_SERVICE
+        )
+        ret = Builtins.add(ret, t)
+      end
 
-      deep_copy(ret)
+      ret
     end
 
     def RepoFilterWidget
@@ -1035,7 +1064,7 @@
             exit = true if Popup.YesNoHeadline(headline, msg)
           end
         elsif input == :key_mgr
-          exit = true 
+          exit = true
           #return `key_mgr;
           # start the GPG key manager
           #RunGPGKeyMgmt();
@@ -1058,6 +1087,12 @@
             @repository_view = false
             # display all services
             @displayed_service = ""
+          elsif current_item == NO_SERVICE_ITEM
+            update_table_widget = @repository_view
+            Builtins.y2milestone("Switching to without service view")
+            @repository_view = true
+            # display repositories without service
+            @displayed_service = NO_SERVICE
           elsif Ops.is_string?(current_item)
             # switch to the selected repository
             Builtins.y2milestone("Switching to service %1", current_item)
@@ -1126,7 +1161,7 @@
             if @repository_view
               generalData = Pkg.SourceGeneralData(id)
               # use the full URL (incl. the password) when editing it
-              url2 = Pkg.SourceURL(id)
+              url2 = Pkg.SourceRawURL(id)
               old_url = url2
               plaindir = Ops.get_string(generalData, "type", "YaST") == 
@plaindir_type
 
@@ -1289,7 +1324,7 @@
             else
               service_info = Ops.get(@serviceStatesOut, current, {})
               Builtins.y2milestone("Editing service %1...", current)
-              url2 = Ops.get_string(service_info, "url", "")
+              url2 = Ops.get_string(service_info, "raw_url", "")
               old_url = url2
 
               SourceDialogs.SetRepoName(
@@ -1742,7 +1777,7 @@
         generalData = Pkg.SourceGeneralData(src_id)
         src_url = Ops.get_string(generalData, "url", "")
         ret = true if src_url == url
-      end 
+      end
 
 
       Builtins.y2milestone("URL exists: %1", ret)
@@ -1848,7 +1883,10 @@
         )
 
         # really continue?
-        return :abort if !cont
+        if !cont
+          Wizard.CloseDialog
+          return :abort
+        end
       end
 
       # read known GPG keys
@@ -1901,7 +1939,7 @@
       UI.CloseDialog
       ret
     end
-  end
+  end unless defined? (Yast::RepositoriesClient)
 end
 
 Yast::RepositoriesClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.77/src/include/packager/repositories_include.rb 
new/yast2-packager-3.1.82/src/include/packager/repositories_include.rb
--- old/yast2-packager-3.1.77/src/include/packager/repositories_include.rb      
2015-08-28 15:58:17.000000000 +0200
+++ new/yast2-packager-3.1.82/src/include/packager/repositories_include.rb      
2015-10-16 10:38:09.000000000 +0200
@@ -54,6 +54,8 @@
       )
 
       if url != ""
+        expanded_url = Pkg.ExpandedUrl(url)
+
         # for Plaindir repository we have to use SourceCreateType() binding
         parsed = URL.Parse(url)
         scheme = Ops.get_string(parsed, "scheme", "")
@@ -94,7 +96,7 @@
         )
 
         Progress.NextStage
-        service_type = Pkg.ServiceProbe(url)
+        service_type = Pkg.ServiceProbe(expanded_url)
         Builtins.y2milestone("Probed service type: %1", service_type)
 
         if service_type != nil && service_type != "NONE"
@@ -142,7 +144,7 @@
           return :ok
         end
 
-        new_repos = Pkg.RepositoryScan(url)
+        new_repos = Pkg.RepositoryScan(expanded_url)
         Builtins.y2milestone("new_repos: %1", new_repos)
 
         # add at least one product if the scan result is empty (no product 
info available)
@@ -208,7 +210,7 @@
           # probe repository type (do not probe plaindir repo)
           repo_type = plaindir ?
             @plaindir_type :
-            Pkg.RepositoryProbe(url, prod_dir)
+            Pkg.RepositoryProbe(expanded_url, prod_dir)
           Builtins.y2milestone(
             "Repository type (%1,%2): %3",
             URL.HidePassword(url),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/src/modules/Packages.rb 
new/yast2-packager-3.1.82/src/modules/Packages.rb
--- old/yast2-packager-3.1.77/src/modules/Packages.rb   2015-08-28 
15:58:17.000000000 +0200
+++ new/yast2-packager-3.1.82/src/modules/Packages.rb   2015-10-16 
10:38:09.000000000 +0200
@@ -2728,7 +2728,7 @@
       # map content: old_product => new_product
       updated_products = {}
       installed_products.each do |installed_product|
-        removed = removed_products.find do |removed_product|
+        removed = removed_products.select do |removed_product|
           installed_name = installed_product["name"]
           removed_name = removed_product["name"]
 
@@ -2737,7 +2737,7 @@
             AddOnProduct.renamed?(removed_name, installed_name)
         end
 
-        updated_products[removed] = installed_product if removed
+        removed.each { |r| updated_products[r] = installed_product }
       end
 
       updated_products
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/src/modules/SourceDialogs.rb 
new/yast2-packager-3.1.82/src/modules/SourceDialogs.rb
--- old/yast2-packager-3.1.77/src/modules/SourceDialogs.rb      2015-08-28 
15:58:17.000000000 +0200
+++ new/yast2-packager-3.1.82/src/modules/SourceDialogs.rb      2015-10-16 
10:38:09.000000000 +0200
@@ -814,9 +814,9 @@
       # preserve other URL options, e.g. ?devices=/dev/sr0
       # change the URL only when necessary
       if device == :cd && scheme != "cd"
-        @_url = "cd://"
+        @_url = "cd:///"
       elsif device == :dvd && scheme != "dvd"
-        @_url = "dvd://"
+        @_url = "dvd:///"
       end
 
       nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.77/test/data/zypp/products_update_smt.yml 
new/yast2-packager-3.1.82/test/data/zypp/products_update_smt.yml
--- old/yast2-packager-3.1.77/test/data/zypp/products_update_smt.yml    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.82/test/data/zypp/products_update_smt.yml    
2015-10-16 10:38:09.000000000 +0200
@@ -0,0 +1,108 @@
+---
+- arch: x86_64
+  category: base
+  description: SUSE Linux Enterprise offers ...
+  display_name: SUSE Linux Enterprise Server 11 SP3
+  download_size: 0
+  flags: []
+  flavor: ''
+  inst_size: 0
+  locked: false
+  medium_nr: 0
+  name: SUSE_SLES
+  on_system_by_user: false
+  product_file: "/mnt/etc/products.d/SUSE_SLES.prod"
+  product_line: sles
+  register_release: ''
+  register_target: sle-11-x86_64
+  register_urls:
+  - http://register.novell.com/
+  relnotes_url: 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/11-SP3/release-notes-sles.rpm
+  relnotes_urls:
+  - 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/11-SP3/release-notes-sles.rpm
+  short_name: SLES11_SP3
+  smolt_urls:
+  - http://smolt.novell.com/register.pl
+  source: -1
+  status: :removed
+  summary: SUSE Linux Enterprise Server 11 SP3
+  transact_by: :solver
+  type: base
+  update_urls: []
+  upgrades:
+  - name: SUSE_SLES-SP4-migration
+    notify: true
+    product: SUSE_SLES-SP4-migration
+    repository: ''
+    status: stable
+    summary: SUSE Linux Enterprise Server 11 SP4
+  vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
+  version: 11.3-1.201
+  version_epoch: 
+  version_release: '1.201'
+  version_version: '11.3'
+- arch: x86_64
+  category: addon
+  description: Subscription Management Tool for SUSE Linux Enterprise 11 SP3.
+  display_name: Subscription Management Tool for SUSE Linux Enterprise 11 SP3
+  download_size: 0
+  flags: []
+  flavor: ''
+  inst_size: 0
+  locked: false
+  medium_nr: 0
+  name: sle-smt
+  on_system_by_user: false
+  product_file: "/mnt/etc/products.d/sle-smt.prod"
+  product_line: smt
+  register_release: ''
+  register_target: sle-11-x86_64
+  relnotes_url: 
https://www.suse.com/releasenotes/x86_64/SLE-SMT/11-SP3/release-notes-smt.rpm
+  relnotes_urls:
+  - 
https://www.suse.com/releasenotes/x86_64/SLE-SMT/11-SP3/release-notes-smt.rpm
+  short_name: sle-smt
+  source: -1
+  status: :removed
+  summary: Subscription Management Tool for SUSE Linux Enterprise 11 SP3
+  transact_by: :user
+  type: addon
+  update_urls: []
+  upgrades: []
+  vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
+  version: 11.3-1.7
+  version_epoch: 
+  version_release: '1.7'
+  version_version: '11.3'
+- arch: x86_64
+  category: addon
+  description: SUSE Linux Enterprise offers ...
+  display_name: SUSE Linux Enterprise Server 12 SP1 RC1
+  download_size: 0
+  eol: 1730332800
+  flags: []
+  flavor: DVD
+  inst_size: 0
+  locked: false
+  medium_nr: 0
+  name: SLES
+  on_system_by_user: false
+  product_file: SLES.prod
+  product_line: ''
+  product_package: sles-release
+  register_release: ''
+  register_target: sle-12-x86_64
+  relnotes_url: 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP1/release-notes-sles.rpm
+  relnotes_urls:
+  - 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP1/release-notes-sles.rpm
+  short_name: SLES12-SP1
+  source: 0
+  status: :selected
+  summary: SUSE Linux Enterprise Server 12 SP1 RC1
+  transact_by: :app_high
+  type: addon
+  update_urls: []
+  vendor: SUSE LLC <https://www.suse.com/>
+  version: 12.1-0
+  version_epoch: 
+  version_release: '0'
+  version_version: '12.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.77/test/packages_test.rb 
new/yast2-packager-3.1.82/test/packages_test.rb
--- old/yast2-packager-3.1.77/test/packages_test.rb     2015-08-28 
15:58:17.000000000 +0200
+++ new/yast2-packager-3.1.82/test/packages_test.rb     2015-10-16 
10:38:09.000000000 +0200
@@ -76,7 +76,7 @@
 
     context "when no /proc/cmdline is defined" do
       it "returns empty list" do
-        Yast::SCR.stub(:Read).with(SCR_PROC_CMDLINE_PATH).and_return(nil)
+        expect(Yast::SCR).to 
receive(:Read).with(SCR_PROC_CMDLINE_PATH).and_return(nil)
         expect(Yast::Packages.kernelCmdLinePackages).to eq([])
       end
     end
@@ -279,6 +279,7 @@
   describe "#group_products_by_status" do
     let(:products) { load_zypp("products_update.yml") }
     let(:products2) { load_zypp("products_update2.yml") }
+    let(:smt_products) { load_zypp("products_update_smt.yml") }
 
     it "returns groups of the products" do
       status = Yast::Packages.group_products_by_status(products)
@@ -320,6 +321,15 @@
       expect(status[:kept]).to eq([])
       expect(status[:updated].size).to eq(3)
     end
+
+    it "handles multiple products updated to a single product" do
+      status = Yast::Packages.group_products_by_status(smt_products)
+
+      expect(status[:new]).to eq([])
+      expect(status[:removed]).to eq([])
+      expect(status[:kept]).to eq([])
+      expect(status[:updated].size).to eq(2)
+    end
   end
 
   describe "#product_update_summary" do
@@ -334,6 +344,17 @@
       expect(summary_string).to match(
         /SUSE Linux Enterprise Software Development Kit 11 SP3.*will be 
automatically removed/)
     end
+
+    it "handles multiple products updated to a single product" do
+      smt_update = load_zypp("products_update_smt.yml")
+      summary_string = Yast::Packages.product_update_summary(smt_update).to_s
+
+      expect(summary_string).to match(
+        /SUSE Linux Enterprise Server 11 SP3.*will be updated to.*SUSE Linux 
Enterprise Server 12/)
+
+      expect(summary_string).to match(
+        /Subscription Management Tool for SUSE Linux Enterprise 11 SP3.*will 
be updated to.*SUSE Linux Enterprise Server 12/)
+    end
   end
 
   describe "#product_update_warning" do


Reply via email to