Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2016-03-07 15:02:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2016-02-16 09:27:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2016-03-07 15:02:47.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Feb 22 11:13:20 UTC 2016 - [email protected]
+
+- Show messages coming from libzypp except during installation
+  (bsc#943805)
+- 3.1.90
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.miCabC/_old  2016-03-07 15:02:48.000000000 +0100
+++ /var/tmp/diff_new_pack.miCabC/_new  2016-03-07 15:02:48.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.89
+Version:        3.1.90
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -33,8 +33,8 @@
 BuildRequires:  yast2_theme
 BuildRequires:  rubygem(rspec)
 
-# HwDetection
-BuildRequires:  yast2 >= 3.1.19
+# PackagesUI.show_update_messages
+BuildRequires:  yast2 >= 3.1.175
 
 # Pkg::SourceRawURL() and Pkg:ExpandedUrl()
 BuildRequires:  yast2-pkg-bindings >= 3.1.30

++++++ yast2-packager-3.1.89.tar.bz2 -> yast2-packager-3.1.90.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.89/package/yast2-packager.changes 
new/yast2-packager-3.1.90/package/yast2-packager.changes
--- old/yast2-packager-3.1.89/package/yast2-packager.changes    2016-02-12 
10:53:12.000000000 +0100
+++ new/yast2-packager-3.1.90/package/yast2-packager.changes    2016-03-05 
11:57:38.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Feb 22 11:13:20 UTC 2016 - [email protected]
+
+- Show messages coming from libzypp except during installation
+  (bsc#943805)
+- 3.1.90
+
+-------------------------------------------------------------------
 Thu Feb 11 15:25:26 CET 2016 - [email protected]
 
 - Allowing AutoYaST to confirm licenses.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.89/package/yast2-packager.spec 
new/yast2-packager-3.1.90/package/yast2-packager.spec
--- old/yast2-packager-3.1.89/package/yast2-packager.spec       2016-02-12 
10:53:12.000000000 +0100
+++ new/yast2-packager-3.1.90/package/yast2-packager.spec       2016-03-05 
11:57:38.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.89
+Version:        3.1.90
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -32,8 +32,8 @@
 BuildRequires:  yast2_theme
 BuildRequires:  rubygem(rspec)
 
-# HwDetection
-BuildRequires: yast2 >= 3.1.19
+# PackagesUI.show_update_messages
+BuildRequires: yast2 >= 3.1.175
 
 # Pkg::SourceRawURL() and Pkg:ExpandedUrl()
 BuildRequires: yast2-pkg-bindings >= 3.1.30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.89/src/modules/PackageInstallation.rb 
new/yast2-packager-3.1.90/src/modules/PackageInstallation.rb
--- old/yast2-packager-3.1.89/src/modules/PackageInstallation.rb        
2016-02-12 10:53:12.000000000 +0100
+++ new/yast2-packager-3.1.90/src/modules/PackageInstallation.rb        
2016-03-05 11:57:38.000000000 +0100
@@ -100,7 +100,7 @@
 
 
     #  commitPackages marked for deletion or installation
-    #  Return: [ int successful, list failed, list remaining, list 
srcremaining ]
+    #  Return: [ int successful, list failed, list remaining, list 
srcremaining, list update_messages ]
     #
     #
     def Commit(config)
@@ -138,7 +138,6 @@
 
       start_time = Builtins.time
 
-      commit_result = []
       # returns [ int successful, list failed, list remaining, list 
srcremaining ]
       Builtins.y2milestone("Calling Pkg::Commit (%1)", config)
       commit_result = Pkg.Commit(config)
@@ -188,6 +187,8 @@
         )
       end
 
+      PackagesUI.show_update_messages(commit_result) unless Mode.installation 
|| Mode.autoinst
+
       if Mode.normal
         # collect and set installation summary data
         summary = PackageSlideShow.GetPackageSummary
@@ -213,9 +214,8 @@
       deep_copy(commit_result)
     end
 
-
     #  commitPackages marked for deletion or installation
-    #  Return: [ int successful, list failed, list remaining, list 
srcremaining ]
+    #  Return: [ int successful, list failed, list remaining, list 
srcremaining, list update_messages ]
     #
     #
     def CommitPackages(media_number, packages_installed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.89/test/Makefile.am 
new/yast2-packager-3.1.90/test/Makefile.am
--- old/yast2-packager-3.1.89/test/Makefile.am  2016-02-12 10:53:12.000000000 
+0100
+++ new/yast2-packager-3.1.90/test/Makefile.am  2016-03-05 11:57:38.000000000 
+0100
@@ -1,5 +1,6 @@
 TESTS = \
   addon_product_test.rb \
+  package_installation_test.rb \
   packages_test.rb \
   source_dialogs_test.rb \
   space_calculation_test.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.89/test/package_installation_test.rb 
new/yast2-packager-3.1.90/test/package_installation_test.rb
--- old/yast2-packager-3.1.89/test/package_installation_test.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.90/test/package_installation_test.rb 2016-03-05 
11:57:39.000000000 +0100
@@ -0,0 +1,95 @@
+#! /usr/bin/env rspec
+
+require_relative "./test_helper"
+
+Yast.import "PackageInstallation"
+
+describe Yast::PackageInstallation do
+  subject { Yast::PackageInstallation }
+
+  describe "#Commit" do
+    let(:config) { {"medium_nr" => 0} }
+    let(:result) { [1, [], [], [], []] }
+
+    before do
+      allow(Yast::PackageSlideShow).to receive(:SetCurrentCdNo)
+      allow(Yast::Pkg).to receive(:Commit).with(config)
+        .and_return(result)
+      allow(Yast::PackagesUI).to receive(:show_update_messages)
+    end
+
+    context "when commit is successful" do
+      it "returns the commit result" do
+        allow(Yast::PackagesUI).to receive(:SetPackageSummary)
+        expect(subject.Commit(config)).to eq(result)
+      end
+
+      context "when running in normal mode" do
+        it "shows a summary" do
+          expect(Yast::PackagesUI).to receive(:SetPackageSummary)
+          subject.Commit(config)
+        end
+      end
+
+      context "when not running in normal mod" do
+        before { expect(Yast::Mode).to receive(:normal).and_return(false) }
+
+        it "does not show a summary" do
+          expect(Yast::PackagesUI).to_not receive(:SetPackageSummary)
+          subject.Commit(config)
+        end
+      end
+    end
+
+    context "when commit fails" do
+      let(:result) { nil }
+
+      it "logs the error and returns []" do
+        expect(Yast::Pkg).to receive(:Commit).with(config)
+          .and_return(result)
+        allow(Yast::Pkg).to receive(:LastError).and_return("error")
+        expect(Yast::Builtins).to receive(:y2error).with(/Commit failed/, 
"error")
+        expect(subject.Commit(config)).to eq([])
+      end
+    end
+
+    context "when update messages are received" do
+      let(:result) { [1, [], [], [], [message]] }
+      let(:message) do
+        {
+          "solvable"         => "dummy-package",
+          "text"             => "Some dummy text.",
+          "installationPath" => "/var/adm/update-message/dummy-package-1.0",
+          "currentPath"      => "/var/adm/update-message/dummy-package-1.0"
+        }
+      end
+
+      it "shows the update messages" do
+        expect(Yast::PackagesUI).to receive(:show_update_messages).with(result)
+        subject.Commit(config)
+      end
+
+      context "in installation mode" do
+        before do
+          allow(Yast::Mode).to receive(:installation).and_return(true)
+        end
+
+        it "does not show the update messages" do
+          expect(Yast::PackagesUI).to_not 
receive(:show_update_messages).with(result)
+          subject.Commit(config)
+        end
+      end
+
+      context "in autoinstallation mode" do
+        before do
+          allow(Yast::Mode).to receive(:autoinst).and_return(true)
+        end
+
+        it "does not show the update messages" do
+          expect(Yast::PackagesUI).to_not 
receive(:show_update_messages).with(result)
+          subject.Commit(config)
+        end
+      end
+    end
+  end
+end


Reply via email to