Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2019-01-05 14:40:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Sat Jan  5 14:40:28 2019 rev:362 rq:662661 version:4.1.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2018-12-31 09:45:14.786272751 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.28833/yast2-packager.changes 
2019-01-05 14:40:32.744572563 +0100
@@ -1,0 +2,7 @@
+Thu Dec 27 17:29:32 UTC 2018 - [email protected]
+
+- Display the license agreement checkbox only when needed
+  (related to fate#325482)
+- 4.1.24
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.9Ui4TP/_old  2019-01-05 14:40:33.508571914 +0100
+++ /var/tmp/diff_new_pack.9Ui4TP/_new  2019-01-05 14:40:33.512571911 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-packager
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.1.23
+Version:        4.1.24
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-4.1.23.tar.bz2 -> yast2-packager-4.1.24.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.1.23/package/yast2-packager.changes 
new/yast2-packager-4.1.24/package/yast2-packager.changes
--- old/yast2-packager-4.1.23/package/yast2-packager.changes    2018-12-20 
13:16:41.000000000 +0100
+++ new/yast2-packager-4.1.24/package/yast2-packager.changes    2019-01-03 
13:56:53.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Dec 27 17:29:32 UTC 2018 - [email protected]
+
+- Display the license agreement checkbox only when needed
+  (related to fate#325482)
+- 4.1.24
+
+-------------------------------------------------------------------
 Mon Dec 17 16:12:37 UTC 2018 - [email protected]
 
 - always use absolute path to binaries (bsc#1118291)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.1.23/package/yast2-packager.spec 
new/yast2-packager-4.1.24/package/yast2-packager.spec
--- old/yast2-packager-4.1.23/package/yast2-packager.spec       2018-12-20 
13:16:41.000000000 +0100
+++ new/yast2-packager-4.1.24/package/yast2-packager.spec       2019-01-03 
13:56:53.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.1.23
+Version:        4.1.24
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.1.23/src/lib/y2packager/dialogs/inst_product_license.rb 
new/yast2-packager-4.1.24/src/lib/y2packager/dialogs/inst_product_license.rb
--- 
old/yast2-packager-4.1.23/src/lib/y2packager/dialogs/inst_product_license.rb    
    2018-12-20 13:16:41.000000000 +0100
+++ 
new/yast2-packager-4.1.24/src/lib/y2packager/dialogs/inst_product_license.rb    
    2019-01-03 13:56:53.000000000 +0100
@@ -55,11 +55,24 @@
         VBox(
           Widgets::ProductLicenseTranslations.new(product, 
Yast::Language.language),
           HBox(
-            Left(Widgets::ProductLicenseConfirmation.new(product)),
+            confirmation_checkbox,
             HStretch()
           )
         )
       end
+
+    private
+
+      # Return the license confirmation widget if required
+      #
+      # It returns Empty() if confirmation is not needed.
+      #
+      # @return [Yast::Term,ProductLicenseConfirmation] Product confirmation 
license widget
+      #   or Empty() if confirmation is not needed.
+      def confirmation_checkbox
+        return Empty() unless product.license_confirmation_required?
+        Widgets::ProductLicenseConfirmation.new(product)
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.1.23/test/lib/dialogs/inst_product_license_test.rb 
new/yast2-packager-4.1.24/test/lib/dialogs/inst_product_license_test.rb
--- old/yast2-packager-4.1.23/test/lib/dialogs/inst_product_license_test.rb     
2018-12-20 13:16:41.000000000 +0100
+++ new/yast2-packager-4.1.24/test/lib/dialogs/inst_product_license_test.rb     
2019-01-03 13:56:53.000000000 +0100
@@ -22,16 +22,30 @@
   end
 
   let(:language) { "en_US" }
+  let(:confirmation_required) { true }
 
   describe "#contents" do
     before do
       allow(Yast::Language).to receive(:language).and_return(language)
+      allow(product).to 
receive(:license_confirmation_required?).and_return(confirmation_required)
     end
 
-    it "includes a confirmation checkbox" do
-      expect(Y2Packager::Widgets::ProductLicenseConfirmation).to receive(:new)
-        .with(product)
-      dialog.contents
+    context "when license acceptance is required" do
+      it "includes a confirmation checkbox" do
+        expect(Y2Packager::Widgets::ProductLicenseConfirmation).to 
receive(:new).with(product)
+
+        dialog.contents
+      end
+    end
+
+    context "when license acceptance is not required" do
+      let(:confirmation_required) { false }
+
+      it "doest not include a confirmation checkbox" do
+        expect(Y2Packager::Widgets::ProductLicenseConfirmation).to_not 
receive(:new).with(product)
+
+        dialog.contents
+      end
     end
 
     it "includes product translations using the current language as default" do


Reply via email to