Hello community, here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2012-04-12 09:59:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old) and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes 2012-01-26 14:09:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2012-04-12 10:00:10.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Apr 5 10:32:47 CEST 2012 - [email protected] + +- removed libxcrypt-devel from buildrequires + +------------------------------------------------------------------- Old: ---- yast2-ruby-bindings-0.3.9.tar.bz2 New: ---- yast2-ruby-bindings-0.3.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ruby-bindings.spec ++++++ --- /var/tmp/diff_new_pack.Go19RZ/_old 2012-04-12 10:00:11.000000000 +0200 +++ /var/tmp/diff_new_pack.Go19RZ/_new 2012-04-12 10:00:11.000000000 +0200 @@ -16,8 +16,12 @@ # +# +# spec file for package yast2-ruby-bindings (Version 0.1) +# + Name: yast2-ruby-bindings -Version: 0.3.9 +Version: 0.3.10 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-ruby-bindings-%{version}.tar.bz2 @@ -25,7 +29,6 @@ BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: libxcrypt-devel BuildRequires: swig BuildRequires: yast2-core-devel BuildRequires: yast2-devtools >= 2.16.3 @@ -37,7 +40,7 @@ BuildRequires: yast2-ycp-ui-bindings-devel >= 2.16.37 Requires: ruby Summary: Ruby bindings for the YaST platform -License: GPL-2.0+ +License: GPL-2.0 Group: System/YaST %description @@ -46,7 +49,6 @@ %prep %setup -n yast2-ruby-bindings-%{version} - %build mkdir build cd build @@ -69,6 +71,9 @@ make test ARGS=-V cd .. +%clean +rm -rf "$RPM_BUILD_ROOT" + %files %defattr (-, root, root) %{_libdir}/YaST2/plugin/libpy2lang_ruby.so ++++++ yast2-ruby-bindings-0.3.9.tar.bz2 -> yast2-ruby-bindings-0.3.10.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/MAINTAINER new/yast2-ruby-bindings-0.3.10/MAINTAINER --- old/yast2-ruby-bindings-0.3.9/MAINTAINER 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/MAINTAINER 2012-04-05 15:31:55.000000000 +0200 @@ -1,2 +1,2 @@ -Duncan Mac-Vicar <[email protected]> +Josef Reidinger <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/VERSION.cmake new/yast2-ruby-bindings-0.3.10/VERSION.cmake --- old/yast2-ruby-bindings-0.3.9/VERSION.cmake 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/VERSION.cmake 2012-04-05 15:31:55.000000000 +0200 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "3") -SET(VERSION_PATCH "9") +SET(VERSION_PATCH "10") Files old/yast2-ruby-bindings-0.3.9/package/yast2-ruby-bindings-0.3.9.tar.bz2 and new/yast2-ruby-bindings-0.3.10/package/yast2-ruby-bindings-0.3.9.tar.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-0.3.10/package/yast2-ruby-bindings.changes --- old/yast2-ruby-bindings-0.3.9/package/yast2-ruby-bindings.changes 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/package/yast2-ruby-bindings.changes 2012-04-05 15:31:55.000000000 +0200 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Apr 5 10:32:47 CEST 2012 - [email protected] + +- removed libxcrypt-devel from buildrequires + +------------------------------------------------------------------- Thu Jan 19 12:11:56 UTC 2012 - [email protected] - improve previous fix to allow loading also file in namespace ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-0.3.10/package/yast2-ruby-bindings.spec --- old/yast2-ruby-bindings-0.3.9/package/yast2-ruby-bindings.spec 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/package/yast2-ruby-bindings.spec 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ - - -# -# spec file for package yast2-ruby-bindings (Version 0.1) -# -# norootforbuild - -Name: yast2-ruby-bindings -Version: 0.3.9 -Release: 0 -License: GPL-2.0+ -Group: System/YaST -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-ruby-bindings-%{version}.tar.bz2 -Prefix: /usr - -BuildRequires: swig cmake gcc-c++ libxcrypt-devel yast2-core-devel -BuildRequires: yast2-devtools >= 2.16.3 -# libzypp-devel is missing .la requires -BuildRequires: ruby-devel -Requires: yast2-core >= 2.18.1 -BuildRequires: yast2-core-devel >= 2.18.1 -Requires: yast2-ycp-ui-bindings >= 2.16.37 -BuildRequires: yast2-ycp-ui-bindings-devel >= 2.16.37 -Requires: ruby -Summary: Ruby bindings for the YaST platform - -%description -The bindings allow YaST modules to be written using the Ruby language -and also Ruby scripts can use YaST agents, APIs and modules. - -%prep -%setup -n yast2-ruby-bindings-%{version} -%build -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \ - -DLIB=%{_lib} \ - -DCMAKE_C_FLAGS="%{optflags}" \ - -DCMAKE_CXX_FLAGS="%{optflags}" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_RPATH=1 \ - .. -make %{?jobs:-j %jobs} VERBOSE=1 - -%install -cd build -make install DESTDIR=$RPM_BUILD_ROOT -cd .. - -%check -cd build -make test ARGS=-V -cd .. - -%files -%defattr (-, root, root) -%{_libdir}/YaST2/plugin/libpy2lang_ruby.so -%{_libdir}/ruby/vendor_ruby/%{rb_ver}/ycp.rb -%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/ycpx.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/src/ruby/YRuby.cc new/yast2-ruby-bindings-0.3.10/src/ruby/YRuby.cc --- old/yast2-ruby-bindings-0.3.9/src/ruby/YRuby.cc 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/src/ruby/YRuby.cc 2012-04-05 15:31:55.000000000 +0200 @@ -56,6 +56,17 @@ #include "Y2RubyTypeConv.h" +void inject_last_exception_method(VALUE& module,const string& message, const string& module_name) +{ + //doing injection from C++ is quite complex, but we have eval, so we can do it in ruby :) + string code("module "); + code += module_name; + code += "\ndef self.last_exception\n'"; + code += message; + code += "'\nend\nend"; + rb_funcall(module, rb_intern("eval"), 1, rb_str_new2(code.c_str())); +} + static void prependModulePath() { YCPPathSearch::initialize (); @@ -236,12 +247,20 @@ if (error) { VALUE exception = rb_gv_get("$!"); /* get last exception */ - VALUE reason = rb_funcall(exception, rb_intern("to_s"), 0 ); + VALUE reason = rb_funcall(exception, rb_intern("message"), 0 ); VALUE trace = rb_gv_get("$@"); /* get last exception trace */ VALUE backtrace = rb_funcall(trace, rb_intern("join"), 1, rb_str_new("\n\t", 2)); char* tmp = fmtstr("%s\n\t%s", StringValuePtr(reason), StringValuePtr(backtrace)); y2error("%s.%s failed\n%s", module_name.c_str(), function.c_str(), tmp); + free(tmp); + //workaround if last_exception failed, then return always string with message + if(function == "last_exception") //TODO constantify last_exception + { + return YCPString(StringValuePtr(reason)); + } + inject_last_exception_method(module,StringValuePtr(reason),module_name); + return YCPVoid(); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/src/ruby/YRubyNamespace.cc new/yast2-ruby-bindings-0.3.10/src/ruby/YRubyNamespace.cc --- old/yast2-ruby-bindings-0.3.9/src/ruby/YRubyNamespace.cc 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/src/ruby/YRubyNamespace.cc 2012-04-05 15:31:55.000000000 +0200 @@ -253,6 +253,18 @@ enterSymbol (fun_se, 0); y2milestone("method: '%s' added", RSTRING(current)->ptr); } + //add to all modules method last_exception to get last exception raised inside module + constTypePtr sym_tp = Type::fromSignature("any()"); + // symbol entry for the function + SymbolEntry *fun_se = new SymbolEntry ( this, + i,// position. arbitrary numbering. + "last_exception", // passed to Ustring, no need to strdup + SymbolEntry::c_function, + sym_tp); + fun_se->setGlobal (true); + // enter it to the symbol table + enterSymbol (fun_se, 0); + y2milestone("method: 'last_exception' added"); y2milestone("%s", symbolsToString().c_str()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/tests/ycp/InRuby.rb new/yast2-ruby-bindings-0.3.10/tests/ycp/InRuby.rb --- old/yast2-ruby-bindings-0.3.9/tests/ycp/InRuby.rb 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/tests/ycp/InRuby.rb 2012-04-05 15:31:55.000000000 +0200 @@ -2,4 +2,8 @@ def self.multiply_by_eight(n) n * 8 end + + def self.raising_code + raise "Wow exception!" + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/tests/ycp/ruby_from_ycp.ycp new/yast2-ruby-bindings-0.3.10/tests/ycp/ruby_from_ycp.ycp --- old/yast2-ruby-bindings-0.3.9/tests/ycp/ruby_from_ycp.ycp 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/tests/ycp/ruby_from_ycp.ycp 2012-04-05 15:31:55.000000000 +0200 @@ -3,6 +3,19 @@ import "InRuby"; string result = tostring(InRuby::multiply_by_eight(10)); y2milestone("result: %1", result); + result = tostring(InRuby::raising_code()); + if (result==nil) + { + result = tostring(InRuby::last_exception()); + y2milestone("result: %1", result); + if(result != "Wow exception!") + return false; + } + else + { + y2error("exception completely ignored result: %1",result); + return false; + } import "CamelCase"; result = tostring(CamelCase::inc(10)); y2milestone("result: %1", result); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/tests/ycp/y2signal.log new/yast2-ruby-bindings-0.3.10/tests/ycp/y2signal.log --- old/yast2-ruby-bindings-0.3.9/tests/ycp/y2signal.log 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/tests/ycp/y2signal.log 1970-01-01 01:00:00.000000000 +0100 @@ -1,55 +0,0 @@ -=== 2012-01-16 14:42:45 +0000 === -YaST got signal 11 at YCP file :0 -Liberating suppressed debugging messages: -End of suppressed debugging messages -Backtrace: (use c++filt to demangle) -/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x15)[0x7f2617f77475] -/usr/lib64/liby2.so.2(_Z14signal_handleri+0x147)[0x7f2617f77657] -/lib64/libc.so.6(+0x34e10)[0x7f2616040e10] -/usr/lib64/liby2.so.2(main+0x70a)[0x7f2617f721da] -/lib64/libc.so.6(__libc_start_main+0xed)[0x7f261602d23d] -/usr/lib/YaST2/bin/y2base[0x400669] -=== 2012-01-16 14:43:28 +0000 === -YaST got signal 11 at YCP file :0 -Liberating suppressed debugging messages: -End of suppressed debugging messages -Backtrace: (use c++filt to demangle) -/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x15)[0x7faeab397475] -/usr/lib64/liby2.so.2(_Z14signal_handleri+0x147)[0x7faeab397657] -/lib64/libc.so.6(+0x34e10)[0x7faea9460e10] -/usr/lib64/liby2.so.2(main+0x70a)[0x7faeab3921da] -/lib64/libc.so.6(__libc_start_main+0xed)[0x7faea944d23d] -/usr/lib/YaST2/bin/y2base[0x400669] -=== 2012-01-16 14:43:59 +0000 === -YaST got signal 11 at YCP file :0 -Liberating suppressed debugging messages: -End of suppressed debugging messages -Backtrace: (use c++filt to demangle) -/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x15)[0x7ffa312af475] -/usr/lib64/liby2.so.2(_Z14signal_handleri+0x147)[0x7ffa312af657] -/lib64/libc.so.6(+0x34e10)[0x7ffa2f378e10] -/usr/lib64/liby2.so.2(main+0x70a)[0x7ffa312aa1da] -/lib64/libc.so.6(__libc_start_main+0xed)[0x7ffa2f36523d] -/usr/lib/YaST2/bin/y2base[0x400669] -=== 2012-01-25 15:49:34 +0000 === -YaST got signal 11 at YCP file :0 -Liberating suppressed debugging messages: -End of suppressed debugging messages -Backtrace: (use c++filt to demangle) -/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x15)[0x7fa5b8dd7475] -/usr/lib64/liby2.so.2(_Z14signal_handleri+0x147)[0x7fa5b8dd7657] -/lib64/libc.so.6(+0x34e10)[0x7fa5b6ea0e10] -/usr/lib64/liby2.so.2(main+0x70a)[0x7fa5b8dd21da] -/lib64/libc.so.6(__libc_start_main+0xed)[0x7fa5b6e8d23d] -/usr/lib/YaST2/bin/y2base[0x400669] -=== 2012-01-25 15:50:03 +0000 === -YaST got signal 11 at YCP file :0 -Liberating suppressed debugging messages: -End of suppressed debugging messages -Backtrace: (use c++filt to demangle) -/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x15)[0x7f4629010475] -/usr/lib64/liby2.so.2(_Z14signal_handleri+0x147)[0x7f4629010657] -/lib64/libc.so.6(+0x34e10)[0x7f46270d9e10] -/usr/lib64/liby2.so.2(main+0x70a)[0x7f462900b1da] -/lib64/libc.so.6(__libc_start_main+0xed)[0x7f46270c623d] -/usr/lib/YaST2/bin/y2base[0x400669] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-0.3.9/yast2-ruby-bindings.spec.in new/yast2-ruby-bindings-0.3.10/yast2-ruby-bindings.spec.in --- old/yast2-ruby-bindings-0.3.9/yast2-ruby-bindings.spec.in 2012-01-25 16:57:33.000000000 +0100 +++ new/yast2-ruby-bindings-0.3.10/yast2-ruby-bindings.spec.in 2012-04-05 15:31:55.000000000 +0200 @@ -8,13 +8,13 @@ Name: yast2-ruby-bindings Version: @VERSION@ Release: 0 -License: GPL-2.0+ +License: GPL-2.0 Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-ruby-bindings-%{version}.tar.bz2 Prefix: /usr -BuildRequires: swig cmake gcc-c++ libxcrypt-devel yast2-core-devel +BuildRequires: swig cmake gcc-c++ yast2-core-devel BuildRequires: yast2-devtools >= 2.16.3 # libzypp-devel is missing .la requires BuildRequires: ruby-devel -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
