Hello community, here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2018-04-07 20:52:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old) and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings" Sat Apr 7 20:52:26 2018 rev:89 rq:594058 version:4.0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes 2018-01-16 09:32:52.592348587 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2018-04-07 20:52:28.960324470 +0200 @@ -1,0 +2,13 @@ +Fri Apr 6 15:46:50 UTC 2018 - jlo...@suse.com + +- Allow to directly abort the process (needed for fate#318196). +- 4.0.6 + +------------------------------------------------------------------- +Tue Mar 27 12:52:27 UTC 2018 - lsle...@suse.cz + +- Log a warning if no text domain is configured for translations, + this helps with debugging (improved as a part of bsc#1081466) +- 4.0.5 + +------------------------------------------------------------------- Old: ---- yast2-ruby-bindings-4.0.4.tar.bz2 New: ---- yast2-ruby-bindings-4.0.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ruby-bindings.spec ++++++ --- /var/tmp/diff_new_pack.W8unc1/_old 2018-04-07 20:52:29.472305940 +0200 +++ /var/tmp/diff_new_pack.W8unc1/_new 2018-04-07 20:52:29.476305794 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 4.0.4 +Version: 4.0.6 Release: 0 Url: https://github.com/yast/yast-ruby-bindings BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-ruby-bindings-4.0.4.tar.bz2 -> yast2-ruby-bindings-4.0.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-4.0.4/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-4.0.6/package/yast2-ruby-bindings.changes --- old/yast2-ruby-bindings-4.0.4/package/yast2-ruby-bindings.changes 2018-01-09 15:55:12.000000000 +0100 +++ new/yast2-ruby-bindings-4.0.6/package/yast2-ruby-bindings.changes 2018-04-06 18:38:51.000000000 +0200 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Fri Apr 6 15:46:50 UTC 2018 - jlo...@suse.com + +- Allow to directly abort the process (needed for fate#318196). +- 4.0.6 + +------------------------------------------------------------------- +Tue Mar 27 12:52:27 UTC 2018 - lsle...@suse.cz + +- Log a warning if no text domain is configured for translations, + this helps with debugging (improved as a part of bsc#1081466) +- 4.0.5 + +------------------------------------------------------------------- Tue Jan 9 14:41:33 UTC 2018 - jreidin...@suse.com - Set proper title also for YaST2 scc (bsc#1075164) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-4.0.4/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-4.0.6/package/yast2-ruby-bindings.spec --- old/yast2-ruby-bindings-4.0.4/package/yast2-ruby-bindings.spec 2018-01-09 15:55:12.000000000 +0100 +++ new/yast2-ruby-bindings-4.0.6/package/yast2-ruby-bindings.spec 2018-04-06 18:38:51.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 4.0.4 +Version: 4.0.6 Url: https://github.com/yast/yast-ruby-bindings Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-4.0.4/src/ruby/yast/i18n.rb new/yast2-ruby-bindings-4.0.6/src/ruby/yast/i18n.rb --- old/yast2-ruby-bindings-4.0.4/src/ruby/yast/i18n.rb 2018-01-09 15:55:12.000000000 +0100 +++ new/yast2-ruby-bindings-4.0.6/src/ruby/yast/i18n.rb 2018-04-06 18:38:51.000000000 +0200 @@ -11,7 +11,7 @@ DEFAULT_LOCALE = "en_US".freeze # sets new text domain - def textdomain(domain) + def textdomain(domain) # usually without brackets like textdomain "example" # initialize FastGettext only if the locale directory exists return unless File.exist? LOCALE_DIR @@ -43,7 +43,11 @@ # translates given string def _(str) # no textdomain configured yet - return str unless @my_textdomain + if !@my_textdomain + Yast.y2warning("No textdomain configured, cannot translate #{str.inspect}") + Yast.y2warning("Called from: #{::Kernel.caller(1).first}") + return str + end found = true # Switching textdomain clears gettext caches so avoid it if possible. @@ -99,7 +103,12 @@ # @param (String) plural text for translators for bigger value def n_(singular, plural, num) # no textdomain configured yet - return fallback_n_(singular, plural, num) unless @my_textdomain + if !@my_textdomain + # it's enough to log just the singular form + Yast.y2warning("No textdomain configured, cannot translate text #{singular.inspect}") + Yast.y2warning("Called from: #{::Kernel.caller(1).first}") + return fallback_n_(singular, plural, num) + end # Switching textdomain clears gettext caches so avoid it if possible. # difference between _ and n_ is hat we need special cache for plural forms @@ -181,3 +190,8 @@ end end end + +# just to make the y2makepot script happy +=begin +textdomain "example" +=end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-4.0.4/src/ruby/yast/wfm.rb new/yast2-ruby-bindings-4.0.6/src/ruby/yast/wfm.rb --- old/yast2-ruby-bindings-4.0.4/src/ruby/yast/wfm.rb 2018-01-09 15:55:12.000000000 +0100 +++ new/yast2-ruby-bindings-4.0.6/src/ruby/yast/wfm.rb 2018-04-06 18:38:51.000000000 +0200 @@ -281,6 +281,18 @@ e.backtrace.join("\n")) end + # Handles exception to abort the process + # + # In some cases, user can request to directly abort the process (e.g., when + # it is not possible to acquire a lock). In that situations, the general + # exception handler should be avoided to not bother the user. + # + # @param e [Yast::AbortException] + # @param client [String] + private_class_method def self.handle_abort_exception(e, client) + log.info "To abort the process was requested from client #{client}: #{e.class}: #{e.message}" + end + private_class_method def self.check_client_result_type!(result) allowed_types = Ops::TYPES_MAP.values.flatten allowed_types.delete(::Object) # remove generic type for any @@ -309,6 +321,10 @@ rescue SignalException => e handle_signal_exception(e) exit(16) + rescue AbortException => e + # Abort was requested + handle_abort_exception(e, client) + exit rescue Exception => e handle_exception(e, client) false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-4.0.4/src/ruby/yast/yast.rb new/yast2-ruby-bindings-4.0.6/src/ruby/yast/yast.rb --- old/yast2-ruby-bindings-4.0.4/src/ruby/yast/yast.rb 2018-01-09 15:55:12.000000000 +0100 +++ new/yast2-ruby-bindings-4.0.6/src/ruby/yast/yast.rb 2018-04-06 18:38:51.000000000 +0200 @@ -7,6 +7,14 @@ class YReference; end class Path; end + # Custom exception class to indicate the process should abort + # without any more user interaction. + # + # It avoids to show the dialog to handle a general exception + # with options as to launch a debugger. + class AbortException < RuntimeError + end + # @private used to extract place from backtrace BACKTRACE_REGEXP = /^(.*):(\d+):in `.*'$/