# HG changeset patch # User Markus Mützel # Date 1649957233 -7200 # Node ID 8fcac4d6d983d91158605e651209397914b36bfe # Parent ccb904fafc30eeb49050ade3eada4932882a8a5f of-queueing: Fix syntax error with Octave 7 (bug #62314). * src/of-queueing-1-octave7.patch: Add new file. * dist-files.mk: Include new patch. diff -r ccb904fafc30 -r 8fcac4d6d983 dist-files.mk --- a/dist-files.mk Wed Apr 06 10:43:19 2022 -0400 +++ b/dist-files.mk Thu Apr 14 19:27:13 2022 +0200 @@ -531,6 +531,7 @@ of-quaternion-1-cross-fixes.patch \ of-quaternion-2-dev-fixes.patch \ of-quaternion.mk \ + of-queueing-1-octave7.patch \ of-queueing.mk \ of-signal-1-deprecated-warnings.patch \ of-signal-2-error_state.patch \ diff -r ccb904fafc30 -r 8fcac4d6d983 src/of-queueing-1-octave7.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-queueing-1-octave7.patch Thu Apr 14 19:27:13 2022 +0200 @@ -0,0 +1,46 @@ +Description: Fix FTBFS against Octave 7 + print_usage() was called within a logical expression. Since it does not return + a value, this fails with Octave 7 since the latter does stricter checks on + number of output arguments. + This patch uses an if/endif conditional rather than a logical short-circuit + expression. +Author: Sébastien Villemot +Bug: https://savannah.gnu.org/bugs/?62314 +Bug-Debian: https://bugs.debian.org/1009135 +Last-Update: 2022-04-14 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/inst/qnmknode.m ++++ b/inst/qnmknode.m +@@ -126,22 +126,25 @@ function Q = qnmknode( node, S, varargin + endif + elseif ( strcmp(node, "-/g/1-lcfs-pr") ) + ## -/G/1-LCFS-PR node +- ( 2 == nargin || 3 == nargin ) || ... +- print_usage(); ++ if ~( 2 == nargin || 3 == nargin ) ++ print_usage(); ++ endif + if ( 3 == nargin ) + s2 = varargin{1}; + endif + elseif ( strcmp(node, "-/g/1-ps") ) + ## -/G/1-PS (processor sharing) node +- ( 2 == nargin || 3 == nargin ) || ... +- print_usage(); ++ if ~( 2 == nargin || 3 == nargin ) ++ print_usage(); ++ endif + if ( 3 == nargin ) + s2 = varargin{1}; + endif + elseif ( strcmp(node, "-/g/inf") ) + ## -/G/inf (Infinite Server) node +- ( 2 == nargin || 3 == nargin ) || ... +- print_usage(); ++ if ~( 2 == nargin || 3 == nargin ) ++ print_usage(); ++ endif + if ( 3 == nargin ) + s2 = varargin{1}; + endif