Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2014-10-01 11:23:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-09-24 13:09:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes 2014-10-01 11:23:29.000000000 +0200 @@ -1,0 +2,15 @@ +Mon Sep 29 12:32:17 UTC 2014 - lslezak@suse.cz + +- display full URL to the currently displayed EULA (directory + listing has been disabled after moving registration licenses + from nu.novell.com to updates.suse.com) (bnc#898647) +- 3.1.51 + +------------------------------------------------------------------- +Wed Sep 24 16:08:49 UTC 2014 - lslezak@suse.cz + +- fixed failure when checking available free space at installation + (by Thomas Renninger, thanks!) (bnc#898229) +- 3.1.50 + +------------------------------------------------------------------- Old: ---- yast2-packager-3.1.49.tar.bz2 New: ---- yast2-packager-3.1.51.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.ugKiwk/_old 2014-10-01 11:23:31.000000000 +0200 +++ /var/tmp/diff_new_pack.ugKiwk/_new 2014-10-01 11:23:31.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.49 +Version: 3.1.51 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-3.1.49.tar.bz2 -> yast2-packager-3.1.51.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.49/MAINTAINER new/yast2-packager-3.1.51/MAINTAINER --- old/yast2-packager-3.1.49/MAINTAINER 2014-09-23 11:58:09.000000000 +0200 +++ new/yast2-packager-3.1.51/MAINTAINER 2014-09-29 18:53:12.000000000 +0200 @@ -1 +1 @@ -Ladislav Slezak <lslezak@suse.cz> +Deprecated file. Use `osc maintainer yast2-packager` instead. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.49/package/yast2-packager.changes new/yast2-packager-3.1.51/package/yast2-packager.changes --- old/yast2-packager-3.1.49/package/yast2-packager.changes 2014-09-23 11:58:10.000000000 +0200 +++ new/yast2-packager-3.1.51/package/yast2-packager.changes 2014-09-29 18:53:12.000000000 +0200 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Mon Sep 29 12:32:17 UTC 2014 - lslezak@suse.cz + +- display full URL to the currently displayed EULA (directory + listing has been disabled after moving registration licenses + from nu.novell.com to updates.suse.com) (bnc#898647) +- 3.1.51 + +------------------------------------------------------------------- +Wed Sep 24 16:08:49 UTC 2014 - lslezak@suse.cz + +- fixed failure when checking available free space at installation + (by Thomas Renninger, thanks!) (bnc#898229) +- 3.1.50 + +------------------------------------------------------------------- Tue Sep 23 09:48:57 UTC 2014 - lslezak@suse.cz - fixed installation crash when a non-btrfs file system is used diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.49/package/yast2-packager.spec new/yast2-packager-3.1.51/package/yast2-packager.spec --- old/yast2-packager-3.1.49/package/yast2-packager.spec 2014-09-23 11:58:10.000000000 +0200 +++ new/yast2-packager-3.1.51/package/yast2-packager.spec 2014-09-29 18:53:12.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 3.1.49 +Version: 3.1.51 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.49/src/modules/ProductLicense.rb new/yast2-packager-3.1.51/src/modules/ProductLicense.rb --- old/yast2-packager-3.1.49/src/modules/ProductLicense.rb 2014-09-23 11:58:10.000000000 +0200 +++ new/yast2-packager-3.1.51/src/modules/ProductLicense.rb 2014-09-29 18:53:12.000000000 +0200 @@ -18,6 +18,8 @@ include Yast::Logger + DOWNLOAD_URL_SCHEMA = [URI::HTTP, URI::HTTPS, URI::FTP] + def main Yast.import "Pkg" Yast.import "UI" @@ -331,9 +333,7 @@ end def GetLicenseDialog(languages, license_language, licenses, id, spare_space) - languages = deep_copy(languages) - display = UI.GetDisplayInfo - space = Ops.get_boolean(display, "TextMode", true) ? 1 : 3 + space = UI.TextMode ? 1 : 3 license_buttons = VBox( VSpacing(spare_space ? 0 : 1), @@ -347,16 +347,10 @@ ) ) - # 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( - HSpacing(Ops.multiply(2, space)), + HSpacing(2 * space), ( licenses_ref = arg_ref(licenses.value); _GetLicenseDialogTerm_result = GetLicenseDialogTerm( @@ -368,7 +362,7 @@ licenses.value = licenses_ref.value; _GetLicenseDialogTerm_result ), - HSpacing(Ops.multiply(2, space)) + HSpacing(2 * space) ), # BNC #448598 # yes/no buttons exist only if needed @@ -376,27 +370,26 @@ AcceptanceNeeded(id) ? license_buttons : Empty(), VSpacing(spare_space ? 0.5 : 1), HBox( - HSpacing(Ops.multiply(2, space)), + HSpacing(2 * space), @license_file_print != nil ? Left( # FATE #302018 - Label( - # %{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 } ) : - + ReplacePoint( + Id(:printing_hint), + Label( # TRANSLATORS: addition license information - # %1 is replaced with the filename - Builtins.sformat( - _( - "If you want to print this EULA, you can find it\non the first media in the file %1" - ), - @license_file_print + # %1 is replaced with the filename + Builtins.sformat( + _( + "If you want to print this EULA, you can find it\non the first media in the file %1" + ), + @license_file_print + ) ) ) ) : Empty(), - HSpacing(Ops.multiply(2, space)) + HSpacing(2 * space) ), VSpacing(spare_space ? 0 : 1) ) @@ -447,6 +440,9 @@ default_next_button_state ) + # set the initial license download URL + update_license_location(license_language, licenses) + Wizard.SetTitleIcon("yast-license") Wizard.SetFocusToNextButton @@ -935,6 +931,9 @@ Builtins.y2error("No such widget: %1", rp_id) end + # update displayed license URL after changing the license translation + update_license_location(@lic_lang, licenses) + nil end @@ -1549,6 +1548,54 @@ publish :function => :ShowLicenseInInstallation, :type => "boolean (any, integer)" publish :function => :AskInstalledLicenseAgreement, :type => "symbol (string, string)" publish :function => :AskInstalledLicensesAgreement, :type => "symbol (list <string>, string)" + + private + + # check if the license location is an URL for download + # @param [String] location + # @return [Boolean] true if it is a HTTP, HTTPS or an FTP URL + def location_is_url?(location) + DOWNLOAD_URL_SCHEMA.include?(URI(location).class) + rescue URI::InvalidURIError => e + log.error "Error while parsing URL #{location.inspect}: #{e.message}" + false + end + + # split a long URL to multiple lines + # @param [String] url URL + # @return [String] URL split to multiple lines if too long + def format_url(url) + url.scan(/.{1,57}/).join("\n") + end + + # crate a label describing the license URL location + # @param [String] display_url URL to display + # return [String] translated label + def license_download_label(display_url) + # TRANSLATORS: %{license_url} is an URL where the displayed license can be found + (_("If you want to print this EULA, you can download it from\n%{license_url}") % + { :license_url => display_url } ) + end + + # update license location displayed in the dialog (e.g. after license translation + # is changed) + # @param [String] lang language of the currently displayed license + # @param [Yast::ArgRef] reference to the list of licenses + def update_license_location(lang, licenses) + if location_is_url?(license_file_print) && UI.WidgetExists(:printing_hint) + # name of the license file + file = File.basename(WhichLicenceFile(lang, licenses)) + + url = URI(license_file_print) + url.path = File.join(url.path, file) + log.info "Updating license URL: #{url}" + + display_url = format_url(url.to_s) + + UI.ReplaceWidget(:printing_hint, Label(license_download_label(display_url))) + end + end + end ProductLicense = ProductLicenseClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-3.1.49/src/modules/SpaceCalculation.rb new/yast2-packager-3.1.51/src/modules/SpaceCalculation.rb --- old/yast2-packager-3.1.49/src/modules/SpaceCalculation.rb 2014-09-23 11:58:10.000000000 +0200 +++ new/yast2-packager-3.1.51/src/modules/SpaceCalculation.rb 2014-09-29 18:53:12.000000000 +0200 @@ -638,7 +638,7 @@ # This part should be refactored to rely on libstorage. tmpdir = SCR.Read(path(".target.tmpdir")) + "/diskspace_mount" - SCR.Execute(path(".target.bash"), "mkdir -p #{Shellwords.escape(tmpdir)})") + SCR.Execute(path(".target.bash"), "mkdir -p #{Shellwords.escape(tmpdir)}") # mount options determined by partitioner mount_options = (part["fstopt"] || "").split(",") -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org