Hello community,

here is the log from the commit of package yast2-registration for 
openSUSE:Factory checked in at 2018-02-07 18:37:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-registration.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-registration"

Wed Feb  7 18:37:29 2018 rev:10 rq:573711 version:4.0.21

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes    
2018-02-02 22:19:32.413556149 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-registration.new/yast2-registration.changes   
    2018-02-07 18:37:30.379163952 +0100
@@ -1,0 +2,7 @@
+Wed Feb  7 12:26:17 UTC 2018 - [email protected]
+
+- Do no send the product release version ("11.4-1.109") at upgrade,
+  send only the major and minor version ("11.4") (bsc#1079051)
+- 4.0.21
+
+-------------------------------------------------------------------

Old:
----
  yast2-registration-4.0.20.tar.bz2

New:
----
  yast2-registration-4.0.21.tar.bz2

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

Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.g3riiW/_old  2018-02-07 18:37:30.887140154 +0100
+++ /var/tmp/diff_new_pack.g3riiW/_new  2018-02-07 18:37:30.895139779 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.0.20
+Version:        4.0.21
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-registration-4.0.20.tar.bz2 -> yast2-registration-4.0.21.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.0.20/package/yast2-registration.changes 
new/yast2-registration-4.0.21/package/yast2-registration.changes
--- old/yast2-registration-4.0.20/package/yast2-registration.changes    
2018-02-02 18:26:29.000000000 +0100
+++ new/yast2-registration-4.0.21/package/yast2-registration.changes    
2018-02-07 14:31:08.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Feb  7 12:26:17 UTC 2018 - [email protected]
+
+- Do no send the product release version ("11.4-1.109") at upgrade,
+  send only the major and minor version ("11.4") (bsc#1079051)
+- 4.0.21
+
+-------------------------------------------------------------------
 Fri Feb  2 14:20:22 UTC 2018 - [email protected]
 
 - Fixes for the SLE11 -> SLE15 offline migration (fate#323395)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.0.20/package/yast2-registration.spec 
new/yast2-registration-4.0.21/package/yast2-registration.spec
--- old/yast2-registration-4.0.20/package/yast2-registration.spec       
2018-02-02 18:26:29.000000000 +0100
+++ new/yast2-registration-4.0.21/package/yast2-registration.spec       
2018-02-07 14:31:08.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.0.20
+Version:        4.0.21
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.0.20/src/clients/registration.rb 
new/yast2-registration-4.0.21/src/clients/registration.rb
--- old/yast2-registration-4.0.20/src/clients/registration.rb   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-registration-4.0.21/src/clients/registration.rb   2018-02-07 
18:37:31.015134158 +0100
@@ -0,0 +1 @@
+symbolic link to scc.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.0.20/src/lib/registration/sw_mgmt.rb 
new/yast2-registration-4.0.21/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-4.0.20/src/lib/registration/sw_mgmt.rb       
2018-02-02 18:26:29.000000000 +0100
+++ new/yast2-registration-4.0.21/src/lib/registration/sw_mgmt.rb       
2018-02-07 14:31:08.000000000 +0100
@@ -213,11 +213,13 @@
     # convert a libzypp Product Hash to a SUSE::Connect::Remote::Product object
     # @param product [Hash] product Hash obtained from pkg-bindings
     # @return [SUSE::Connect::Remote::Product] the remote product
-    def self.remote_product(product)
+    def self.remote_product(product, version_release: true)
       OpenStruct.new(
         arch:         product["arch"],
         identifier:   product["name"],
-        version:      product["version"],
+        # the "version_version" key does not contain the release number,
+        # e.g. if "version" is "11.4-1.109" then "version_version" is just 
"11.4"
+        version:      version_release ? product["version"] : 
product["version_version"],
         release_type: product["release_type"]
       )
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.0.20/src/lib/registration/ui/migration_repos_workflow.rb
 
new/yast2-registration-4.0.21/src/lib/registration/ui/migration_repos_workflow.rb
--- 
old/yast2-registration-4.0.20/src/lib/registration/ui/migration_repos_workflow.rb
   2018-02-02 18:26:29.000000000 +0100
+++ 
new/yast2-registration-4.0.21/src/lib/registration/ui/migration_repos_workflow.rb
   2018-02-07 14:31:08.000000000 +0100
@@ -207,7 +207,8 @@
         log.info "Loading installed products"
 
         self.products = ::Registration::SwMgmt.installed_products.map do 
|product|
-          ::Registration::SwMgmt.remote_product(product)
+          # report the installed products without the version release 
(bsc#1079051#c11)
+          ::Registration::SwMgmt.remote_product(product, version_release: 
false)
         end
 
         if products.empty?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-registration-4.0.20/test/sw_mgmt_spec.rb 
new/yast2-registration-4.0.21/test/sw_mgmt_spec.rb
--- old/yast2-registration-4.0.20/test/sw_mgmt_spec.rb  2018-02-02 
18:26:29.000000000 +0100
+++ new/yast2-registration-4.0.21/test/sw_mgmt_spec.rb  2018-02-07 
14:31:08.000000000 +0100
@@ -456,4 +456,30 @@
       end
     end
   end
+
+  describe ".remote_product" do
+    let(:product) do
+      {
+        "name"            => "SLES",
+        "arch"            => "x86_64",
+        "version"         => "12.1-1.47",
+        "version_version" => "12.1",
+        "flavor"          => "DVD"
+      }
+    end
+
+    it "converts a Hash into OpenStruct" do
+      expect(subject.remote_product(product)).to be_an(OpenStruct)
+    end
+
+    it "includes the version release" do
+      v = subject.remote_product(product).version
+      expect(v).to include("-")
+    end
+
+    it "does not includes the version release if 'version_release' parameter 
is false" do
+      v = subject.remote_product(product, version_release: false).version
+      expect(v).to_not include("-")
+    end
+  end
 end


Reply via email to