[Pkg-octave-commit] [SCM] octave branch, master, updated. 274fe9599bb47cec3df96d676727d90ac690b915

Rafael Laboissiere rafael at debian.org
Thu May 21 09:42:07 UTC 2009


The following commit has been merged in the master branch:
commit 274fe9599bb47cec3df96d676727d90ac690b915
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Thu May 21 11:07:35 2009 +0200

    Add patch for fixing bug in instersect.m
    
    The patch no-argout-intersect.dpatch was taken the Octave Forge package
    bugfix-3.0.5.  This avoids the creation of the octave-bugfix-3.0.5 package
    (fixes Bug#529049).  Thanks to Adeodato Simó for the suggestion.

diff --git a/debian/changelog b/debian/changelog
index 1784e05..7194905 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+octave3.0 (1:3.0.5-5) UNRELEASED; urgency=low
+
+  * debian/patches/no-argout-intersect.dpatch: Take a bug fix for the
+    intersect.m script from the Octave Forge package bugfix-3.0.5.  This
+    avoids the creation of the octave-bugfix-3.0.5 package (closes:
+    #529049).  Thanks to Adeodato Simó for the suggestion.
+
+ -- Rafael Laboissiere <rafael at debian.org>  Mon, 18 May 2009 08:39:08 +0200
+
 octave3.0 (1:3.0.5-4) unstable; urgency=low
 
   * debian/control: The Debian packaging files are now maintained through
diff --git a/debian/in/00list b/debian/in/00list
index 571b21a..e318599 100644
--- a/debian/in/00list
+++ b/debian/in/00list
@@ -6,6 +6,7 @@ dont_set_helvetica.dpatch
 glpk-new-api.dpatch
 real-no-history.dpatch
 termios-h-check-3.0.dpatch
+no-argout-intersect.dpatch
 :][V_3_1:
 50_octave-bug-tempfile
 no_pdf_in_print.dpatch
diff --git a/debian/patches/no-argout-intersect.dpatch b/debian/patches/no-argout-intersect.dpatch
new file mode 100755
index 0000000..3fd5090
--- /dev/null
+++ b/debian/patches/no-argout-intersect.dpatch
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## -*- diff -*-
+## no-argout-intersect.dpatch by Rafael Laboissiere <rafael at debian.org>
+##
+## DP: Cope with the case where nargout == 0
+## DP: This was taken from package bugfix-3.0.5 of Otave Forge
+
+ at DPATCH@
+--- ../../../octave/octave/scripts/set/intersect.m	2009-02-18 07:57:46.000000000 +0100
++++ ../../octave-bugfix-3.0.5/octave-bugfix-3.0.5/inst/intersect.m	2009-05-08 15:16:47.000000000 +0200
+@@ -1,5 +1,5 @@
++## Copyright (C) 2008, 2009 Jaroslav Hajek
+ ## Copyright (C) 2000, 2006, 2007 Paul Kienzle
+-## Copyright (C) 2008 Jaroslav Hajek
+ ##
+ ## This file is part of Octave.
+ ##
+@@ -22,7 +22,7 @@
+ ## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} intersect (@var{a}, @var{b})
+ ##
+ ## Return the elements in both @var{a} and @var{b}, sorted in ascending
+-## order. If @var{a} and @var{b} are both column vectors return a column
++## order.  If @var{a} and @var{b} are both column vectors return a column
+ ## vector, otherwise return a row vector.
+ ##
+ ## Return index vectors @var{ia} and @var{ib} such that @code{a(ia)==c} and
+@@ -49,6 +49,9 @@
+     if (nargout > 1)
+       [a, ja] = unique (a, varargin{:});
+       [b, jb] = unique (b, varargin{:});
++    else
++      a = unique (a, varargin{:});
++      b = unique (b, varargin{:});
+     endif
+ 
+     if (nargin > 2)
+@@ -87,7 +90,7 @@
+ %! a = [3 2 4 5 7 6 5 1 0 13 13];
+ %! b = [3 5 12 1 1 7];
+ %! [c,ia,ib] = intersect(a,b);
+-%! assert( c,[1 3 5 7]);
++%! assert(c,[1 3 5 7]);
+ %! assert(ia,[8 1 7 5]);
+ %! assert(ib,[5 1 2 6]);
+ %! assert(a(ia),c);
+@@ -101,3 +104,8 @@
+ %! assert(ib,[3;1]);
+ %! assert(a(ia,:),c);
+ %! assert(b(ib,:),c);
++%!test
++%! a = [1 1 1 2 2 2];
++%! b = [1 2 3 4 5 6];
++%! c = intersect(a,b);
++%! assert(c, [1,2]);

-- 
octave



More information about the Pkg-octave-commit mailing list