Package: subversion
Version: 1.4.0
Severity: serious
Tags: patch
Justification: no longer builds from source

Hi,

I looked at the failing self tests. The first one is a bug in the
created wrapper. The basic problem is that in
svn_delta.c:_wrap_svn_txdelta_apply_wrapper() the value of temp3 is not
modified by svn_txdelta_apply_wrapper(), so the return is basically
random. In this case the stack is clear and svn_md5_digest_to_cstring()
returns a NULL, which rb_str_new2() doesn't like.
The easiest fix is to change the typemap in svn_types.swg so it can deal
with the NULL pointer. (BTW I tried returning Qnil here, but that
doesn't work well output_helper.)

The other two failures are a bug in the test itself, which simply take a
bit too much time on m68k, so I modified the test a little to accept a
small delay.

bye, Roman

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: m68k
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.4.30
Locale: LANG=de_DE.UTF-8, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -ur subversion-1.4.0.org/subversion/bindings/swig/include/svn_types.swg subversion-1.4.0/subversion/bindings/swig/include/svn_types.swg
--- subversion-1.4.0.org/subversion/bindings/swig/include/svn_types.swg	2006-04-20 04:47:39.000000000 +0200
+++ subversion-1.4.0/subversion/bindings/swig/include/svn_types.swg	2006-09-15 02:41:36.000000000 +0200
@@ -542,7 +542,7 @@
 %typemap(ruby, argout, fragment="output_helper") unsigned char digest[ANY]
 {
   char *digest_string = (char *)svn_md5_digest_to_cstring($1, _global_pool);
-  $result = output_helper($result, rb_str_new2(digest_string));
+  $result = output_helper($result, rb_str_new2(digest_string ? digest_string : ""));
 }
 
 
@@ -554,7 +554,7 @@
 %typemap(ruby, argout, fragment="output_helper") unsigned char **digest
 {
   char *digest_string = (char *)svn_md5_digest_to_cstring(*$1, _global_pool);
-  $result = output_helper($result, rb_str_new2(digest_string));
+  $result = output_helper($result, rb_str_new2(digest_string ? digest_string : ""));
 }
 
 /* svn_md5_* functions takes const ones as input */

diff -ur subversion-1.4.0.org/subversion/bindings/swig/ruby/test/test_ra.rb subversion-1.4.0/subversion/bindings/swig/ruby/test/test_ra.rb
--- subversion-1.4.0.org/subversion/bindings/swig/ruby/test/test_ra.rb	2006-04-17 16:51:04.000000000 +0200
+++ subversion-1.4.0/subversion/bindings/swig/ruby/test/test_ra.rb	2006-09-15 03:06:43.000000000 +0200
@@ -212,10 +212,10 @@
     session = Svn::Ra::Session.open(@repos_uri, config, callbacks)
     result = nil
 
-    expect = [1, Time.now.to_s, @author]
+    expect = [1, Time.now, @author]
     gc_disable do
       editor, baton = session.commit_editor(log) do |rev, date, author|
-        result = [rev, date.to_s, author]
+        result = [rev, date, author]
       end
       editor.baton = baton
 
@@ -225,6 +225,7 @@
         GC.start
         editor.close_edit
       end
+      expect[1] = result[1] if result[1] >= expect[1] && result[1] < expect[1] + 10
       assert_equal(expect, result)
     end
   end
@@ -238,10 +239,10 @@
     session = Svn::Ra::Session.open(@repos_uri, config, callbacks)
     result = nil
 
-    expect = [1, Time.now.to_s, @author]
+    expect = [1, Time.now, @author]
     gc_disable do
       editor = session.commit_editor2(log) do |info|
-        result = [info.revision, info.date.to_s, info.author]
+        result = [info.revision, info.date, info.author]
       end
 
       root = editor.open_root(-1)
@@ -250,6 +251,7 @@
         GC.start
         editor.close_edit
       end
+      expect[1] = result[1] if result[1] >= expect[1] && result[1] < expect[1] + 10
       assert_equal(expect, result)
     end
   end

Reply via email to