Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2014-06-18 07:47:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2014-06-08 13:36:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2014-06-18 07:47:53.000000000 +0200
@@ -1,0 +2,16 @@
+Thu Jun 12 19:35:30 UTC 2014 - [email protected]
+
+- make sure float time is not reported (bnc#882240)
+- fix total time to be exactly the sum of per media times when
+  a minimum time is used
+- 3.1.23
+
+-------------------------------------------------------------------
+Mon Jun  9 11:04:22 UTC 2014 - [email protected]
+
+- ProductLicense.rb:
+  - display URL where to download the license (bnc#880685)
+  - display a checkbox instead radio buttons (bnc#878976)
+- 3.1.22
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.inYQbG/_old  2014-06-18 07:47:54.000000000 +0200
+++ /var/tmp/diff_new_pack.inYQbG/_new  2014-06-18 07:47:54.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.21
+Version:        3.1.23
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-3.1.21.tar.bz2 -> yast2-packager-3.1.23.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.21/package/yast2-packager.changes 
new/yast2-packager-3.1.23/package/yast2-packager.changes
--- old/yast2-packager-3.1.21/package/yast2-packager.changes    2014-06-02 
10:59:28.000000000 +0200
+++ new/yast2-packager-3.1.23/package/yast2-packager.changes    2014-06-13 
10:29:49.000000000 +0200
@@ -1,4 +1,20 @@
 -------------------------------------------------------------------
+Thu Jun 12 19:35:30 UTC 2014 - [email protected]
+
+- make sure float time is not reported (bnc#882240)
+- fix total time to be exactly the sum of per media times when
+  a minimum time is used
+- 3.1.23
+
+-------------------------------------------------------------------
+Mon Jun  9 11:04:22 UTC 2014 - [email protected]
+
+- ProductLicense.rb:
+  - display URL where to download the license (bnc#880685)
+  - display a checkbox instead radio buttons (bnc#878976)
+- 3.1.22
+
+-------------------------------------------------------------------
 Fri May 30 16:55:25 UTC 2014 - [email protected]
 
 - allow adding a title to license dialog (needed for on-line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.21/package/yast2-packager.spec 
new/yast2-packager-3.1.23/package/yast2-packager.spec
--- old/yast2-packager-3.1.21/package/yast2-packager.spec       2014-06-02 
10:59:28.000000000 +0200
+++ new/yast2-packager-3.1.23/package/yast2-packager.spec       2014-06-13 
10:29:49.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.21
+Version:        3.1.23
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.21/src/modules/PackageSlideShow.rb 
new/yast2-packager-3.1.23/src/modules/PackageSlideShow.rb
--- old/yast2-packager-3.1.21/src/modules/PackageSlideShow.rb   2014-06-02 
10:59:28.000000000 +0200
+++ new/yast2-packager-3.1.23/src/modules/PackageSlideShow.rb   2014-06-13 
10:29:50.000000000 +0200
@@ -17,7 +17,7 @@
     MAX_TIME_PER_CD = 7200
 
     # minimum time displayed per CD if there is something to install
-    MIN_TIME_PER_CD = 10
+    MIN_TIME_PER_CD = 5
 
     # Column index for refreshing statistics: remaining size
     SIZE_COLUMN_POSITION = 1
@@ -367,6 +367,9 @@
           seconds = Ops.divide(remaining, @bytes_per_second)
         end
 
+        seconds = MIN_TIME_PER_CD if seconds < MIN_TIME_PER_CD
+        log.debug "Updating remaining time for source #{@current_src_no} " \
+          "(medium #{@current_cd_no}): #{seconds}"
         Ops.set(
           @remaining_times_per_cd_per_src,
           [Ops.subtract(@current_src_no, 1), Ops.subtract(@current_cd_no, 1)],
@@ -414,7 +417,7 @@
             total = 0
             Builtins.foreach(media_mapping) do |count|
               total = Ops.add(total, count)
-            end 
+            end
 
 
             Builtins.y2milestone(
@@ -426,7 +429,7 @@
           end
         end
         i = Ops.add(i, 1)
-      end 
+      end
 
 
       Builtins.y2milestone("Total number of packages to download: %1", ret)
@@ -523,7 +526,7 @@
       Builtins.y2milestone(
         "PackageSlideShow::InitPkgData(): pkg: %1",
         @total_pkg_count_per_cd_per_src
-      ) 
+      )
 
       # RebuildDialog(true);
 
@@ -692,10 +695,17 @@
             end
           end
 
+          if remaining_time.is_a?(Float)
+            log.warn "Float time appeared: #{remaining_time}"
+            remaining_time = remaining_time.round
+            log.warn "Converted to integer: #{remaining_time}"
+          end
+
           remaining_times_list << remaining_time
         end
 
         @remaining_times_per_cd_per_src << remaining_times_list
+        log.debug "Recalculated remaining time: 
#{@remaining_times_per_cd_per_src}"
       end
 
 
@@ -1034,6 +1044,7 @@
 
               if @unit_is_seconds && Ops.greater_than(@bytes_per_second, 0)
                 remaining = Ops.divide(remaining, @bytes_per_second)
+                remaining = MIN_TIME_PER_CD if remaining < MIN_TIME_PER_CD
                 rem_time = String.FormatTime(remaining) # column #2
 
                 if Ops.greater_than(remaining, MAX_TIME_PER_CD) # clip off at 
2 hours
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.21/src/modules/ProductLicense.rb 
new/yast2-packager-3.1.23/src/modules/ProductLicense.rb
--- old/yast2-packager-3.1.21/src/modules/ProductLicense.rb     2014-06-02 
10:59:28.000000000 +0200
+++ new/yast2-packager-3.1.23/src/modules/ProductLicense.rb     2014-06-13 
10:29:50.000000000 +0200
@@ -10,10 +10,11 @@
 #              Lukas Ocilka <[email protected]>
 #
 require "yast"
+require "uri"
 
 module Yast
   class ProductLicenseClass < Module
-    attr_accessor :license_patterns
+    attr_accessor :license_patterns, :license_file_print
 
     def main
       Yast.import "Pkg"
@@ -379,34 +380,23 @@
       space = Ops.get_boolean(display, "TextMode", true) ? 1 : 3
 
       license_buttons = VBox(
-        VSpacing(spare_space ? 0 : 2),
-        RadioButtonGroup(
-          Id(Builtins.sformat("eula_%1", id)),
-          HBox(
-            HSpacing(Ops.multiply(2, space)),
-            VBox(
-              Left(
-                RadioButton(
-                  Id(Builtins.sformat("yes_%1", id)),
-                  Opt(:notify),
-                  # radio button
-                  _("&Yes, I Agree to the License Agreement")
-                )
-              ),
-              Left(
-                RadioButton(
-                  Id(Builtins.sformat("no_%1", id)),
-                  Opt(:notify),
-                  # radio button
-                  _("N&o, I Do not Agree")
-                )
-              )
-            ),
-            HSpacing(Ops.multiply(2, space))
+        VSpacing(spare_space ? 0 : 1),
+        HCenter(
+          CheckBox(
+            Id("eula_#{id}"),
+            Opt(:notify),
+            # check box label
+            _("I &Agree to the License Terms.")
           )
         )
       )
 
+      # check if the license file name is an URL for download
+      valid_urls = [URI::HTTP, URI::HTTPS, URI::FTP]
+      license_is_url = valid_urls.include?(URI(license_file_print).class) 
rescue false
+      # split a long URL to multiple lines
+      display_url = license_file_print.scan(/.{1,57}/).join("\n") if 
license_file_print
+
       VBox(
         VSpacing(spare_space ? 0 : 1),
         HBox(
@@ -435,7 +425,11 @@
             Left(
               # FATE #302018
               Label(
-                # TRANSLATORS: addition license information
+                # %{license_url} is an URL where the displayed license can be 
found
+                license_is_url ? (_("If you want to print this EULA, you can 
download it from\n" \
+                      "%{license_url}") % { :license_url => display_url } ) :
+
+                  # TRANSLATORS: addition license information
                 # %1 is replaced with the filename
                 Builtins.sformat(
                   _(
@@ -592,7 +586,7 @@
         end
 
         # Success
-        return true 
+        return true
 
         # Nothing to unpack
       else
@@ -804,13 +798,13 @@
       # Bugzilla #299732
       # Base Product - LiveCD installation
       if Mode.live_installation
-        SearchForLicense_LiveCDInstallation(src_id, fallback_dir) 
+        SearchForLicense_LiveCDInstallation(src_id, fallback_dir)
 
         # Base-product - license not in installation
         #   * Stage is not initial
         #   * source ID is not defined
       elsif !Stage.initial && src_id == nil
-        SearchForLicense_NormalRunBaseProduct(src_id, fallback_dir) 
+        SearchForLicense_NormalRunBaseProduct(src_id, fallback_dir)
 
         # Base-product - first-stage installation
         #   * Stage is initial
@@ -820,12 +814,12 @@
         SearchForLicense_FirstStageBaseProduct(
           src_id == nil ? Ops.get(Pkg.SourceGetCurrent(true), 0, 0) : src_id,
           fallback_dir
-        ) 
+        )
 
         # Add-on-product license
         #   * Source ID is set
       elsif src_id != nil && Ops.greater_than(src_id, -1)
-        SearchForLicense_AddOnProduct(src_id, fallback_dir) 
+        SearchForLicense_AddOnProduct(src_id, fallback_dir)
 
         # Fallback
       else
@@ -965,7 +959,7 @@
         if Stage.initial
           # Wizard::OpenNextBackStepsDialog();
           # WorkflowManager::RedrawWizardSteps();
-          Builtins.y2milestone("Initial stage, not opening any window...") 
+          Builtins.y2milestone("Initial stage, not opening any window...")
           # use normal wizard
         else
           Wizard.OpenNextBackDialog
@@ -1025,16 +1019,17 @@
           Builtins.y2error("Widget %1 does not exist", eula_id)
           next
         end
+
         # All licenses have to be accepted
-        license_accepted = Convert.to_string(
-          UI.QueryWidget(Id(eula_id), :CurrentButton)
-        )
+        license_accepted = UI.QueryWidget(Id(eula_id), :Value)
+
         Builtins.y2milestone(
           "License %1 accepted: %2",
           eula_id,
           license_accepted
         )
-        if !Builtins.regexpmatch(license_accepted, "^yes_")
+
+        if !license_accepted
           accepted = false
           raise Break
         end
@@ -1053,18 +1048,6 @@
         if UI.WidgetExists(Id(eula_id)) != true
           Builtins.y2error("Widget %1 does not exist", eula_id)
         end
-        current_button = Convert.to_string(
-          UI.QueryWidget(Id(eula_id), :CurrentButton)
-        )
-        # license have to be accepted or declined
-        if current_button == nil
-          Builtins.y2warning(
-            "License %1 hasn't been accepted or declined",
-            eula_id
-          )
-          ret = false
-          raise Break
-        end
       end
 
       ret
@@ -1081,13 +1064,11 @@
           licenses_ref = arg_ref(licenses.value)
           UpdateLicenseContent(licenses_ref, GetId(Builtins.tostring(ret)))
           licenses.value = licenses_ref.value
-          ret = :language 
+          ret = :language
           # bugzilla #303828
           # disabled next button unless yes/no is selected
-        elsif Ops.is_string?(ret) &&
-            (Builtins.regexpmatch(Builtins.tostring(ret), "^yes_") ||
-              Builtins.regexpmatch(Builtins.tostring(ret), "^no_"))
-          Wizard.EnableNextButton if AllLicensesAcceptedOrDeclined() 
+        elsif Ops.is_string?(ret) && ret.start_with?("eula_")
+          Wizard.EnableNextButton if AllLicensesAcceptedOrDeclined()
           # Aborting the license dialog
         elsif ret == :abort
           # bugzilla #218677

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to