Hello community, here is the log from the commit of package perl-Graph for openSUSE:Factory checked in at 2015-10-03 20:30:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Graph (Old) and /work/SRC/openSUSE:Factory/.perl-Graph.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Graph" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Graph/perl-Graph.changes 2015-09-30 05:51:58.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Graph.new/perl-Graph.changes 2015-10-03 20:30:41.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Oct 2 09:08:25 UTC 2015 - [email protected] + +- updated to 0.9703 + see /usr/share/doc/packages/perl-Graph/Changes + + 0.9703 2015-09-29 Jarkko Hietaniemi <[email protected]> + - document (at user level) the openbsd random problem + - using the 5.22+ Inf was done the wrong way: + https://github.com/neilbowers/Graph/issues/1 + + 0.9702 2015-09-28 Jarkko Hietaniemi <[email protected]> + - rt.cpan.org 107394 $Storable::VERSION may contain underscores + - follow-up to rt.cpan.org 104687: more docs, fixes, and tests for + diameter/radius/shortest_path/center_vertices/vertex_eccentricity + for corner cases like empty graph, single-vertex graphs, and + in general unconnected graphs + - for perl 5.22 or later one should be able to use Inf for Infinity + - openbsd before perl 5.20 had nondeterministic rand() + +------------------------------------------------------------------- Old: ---- Graph-0.97.tar.gz New: ---- Graph-0.9703.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Graph.spec ++++++ --- /var/tmp/diff_new_pack.rI4Kws/_old 2015-10-03 20:30:42.000000000 +0200 +++ /var/tmp/diff_new_pack.rI4Kws/_new 2015-10-03 20:30:42.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Graph -Version: 0.97 +Version: 0.9703 Release: 0 %define cpan_name Graph Summary: Graph Data Structures and Algorithms ++++++ Graph-0.97.tar.gz -> Graph-0.9703.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/Changes new/Graph-0.9703/Changes --- old/Graph-0.97/Changes 2015-09-23 03:11:19.000000000 +0200 +++ new/Graph-0.9703/Changes 2015-09-29 12:43:44.000000000 +0200 @@ -1,5 +1,19 @@ Revision history for Perl module Graph +0.9703 2015-09-29 Jarkko Hietaniemi <[email protected]> + - document (at user level) the openbsd random problem + - using the 5.22+ Inf was done the wrong way: + https://github.com/neilbowers/Graph/issues/1 + +0.9702 2015-09-28 Jarkko Hietaniemi <[email protected]> + - rt.cpan.org 107394 $Storable::VERSION may contain underscores + - follow-up to rt.cpan.org 104687: more docs, fixes, and tests for + diameter/radius/shortest_path/center_vertices/vertex_eccentricity + for corner cases like empty graph, single-vertex graphs, and + in general unconnected graphs + - for perl 5.22 or later one should be able to use Inf for Infinity + - openbsd before perl 5.20 had nondeterministic rand() + 0.97 2015-09-22 Jarkko Hietaniemi <[email protected]> - rt.cpan.org 104687 diameter and centre of a one vertex graph - rt.cpan.org 107195 [PATCH] fix POD: add missing NAME header diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/META.json new/Graph-0.9703/META.json --- old/Graph-0.97/META.json 2015-09-23 03:12:23.000000000 +0200 +++ new/Graph-0.9703/META.json 2015-09-29 12:43:46.000000000 +0200 @@ -27,5 +27,5 @@ "web" : "https://github.com/neilbowers/Graph" } }, - "version" : "0.97" + "version" : "0.9703" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/META.yml new/Graph-0.9703/META.yml --- old/Graph-0.97/META.yml 2015-09-23 03:12:23.000000000 +0200 +++ new/Graph-0.9703/META.yml 2015-09-29 12:43:46.000000000 +0200 @@ -16,4 +16,4 @@ - inc resources: repository: git://github.com/neilbowers/Graph.git -version: '0.97' +version: '0.9703' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/lib/Graph.pm new/Graph-0.9703/lib/Graph.pm --- old/Graph-0.97/lib/Graph.pm 2015-09-23 03:11:19.000000000 +0200 +++ new/Graph-0.9703/lib/Graph.pm 2015-09-29 12:40:54.000000000 +0200 @@ -18,12 +18,12 @@ use vars qw($VERSION); -$VERSION = '0.97'; +$VERSION = '0.9703'; require 5.006; # Weak references are absolutely required. my $can_deep_copy_Storable = - eval 'require Storable; require B::Deparse; $B::Deparse::VERSION =~ s/_\d+$//; $Storable::VERSION >= 2.05 && $B::Deparse::VERSION >= 0.61' && !$@; + eval 'require Storable; require B::Deparse; $Storable::VERSION =~ s/_\d+$//;$B::Deparse::VERSION =~ s/_\d+$//; $Storable::VERSION >= 2.05 && $B::Deparse::VERSION >= 0.61' && !$@; sub _can_deep_copy_Storable () { return $can_deep_copy_Storable; @@ -57,11 +57,15 @@ my $Inf; BEGIN { - local $SIG{FPE}; + if ($] >= 5.022) { + $Inf = eval '+"Inf"'; + } else { + local $SIG{FPE}; eval { $Inf = exp(999) } || eval { $Inf = 9**9**9 } || eval { $Inf = 1e+999 } || { $Inf = 1e+99 }; # Close enough for most practical purposes. + } } sub Infinity () { $Inf } @@ -3744,7 +3748,7 @@ $max = $l; } } - return $max; + return defined $max ? $max : Infinity(); } else { return Infinity(); } @@ -3769,6 +3773,7 @@ @min = $t->path_vertices($u, $v); } } + print "min/1 = @min\n"; return wantarray ? @min : $min; } } else { @@ -3783,10 +3788,13 @@ @min = $t->path_vertices($u, $v); } } + print "min/2 = @min\n"; return wantarray ? @min : $min; } else { my ($min, $max, $minp, $maxp) = $g->_minmax_path(@_); - return defined $minp ? (wantarray ? @$minp : $min) : undef; + return defined $minp + ? (wantarray ? @$minp : $min) + : wantarray ? () : undef; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/lib/Graph.pod new/Graph-0.9703/lib/Graph.pod --- old/Graph-0.97/lib/Graph.pod 2015-09-23 02:52:19.000000000 +0200 +++ new/Graph-0.9703/lib/Graph.pod 2015-09-29 12:37:49.000000000 +0200 @@ -1871,7 +1871,7 @@ The longest path over all the vertex pairs is known as the I<graph diameter>. -For an unconnected graph, returns C<undef>. +For an unconnected graph, single-vertex, or empty graph, returns C<undef>. =item shortest_path @@ -1883,6 +1883,9 @@ path. Note that there might be more than one such path; this interface returns a random one of them. +For an unconnected, single-vertex, or empty graph, returns C<undef> +or an empty list. + =item radius my $gr = $g->radius; @@ -1890,6 +1893,8 @@ The I<shortest longest> path over all the vertex pairs is known as the I<graph radius>. See also L</diameter>. +For an unconnected, single-vertex, or empty graph, returns Infinity. + =item center_vertices =item centre_vertices @@ -1902,14 +1907,15 @@ returned in random order. By specifying a delta value you can widen the criterion from strict equality (handy for non-integer edge weights). -For an unconnected graph, returns an empty list. +For an unconnected, single-vertex, or empty graph, returns an empty list. =item vertex_eccentricity my $ve = $g->vertex_eccentricity($v); The longest path to a vertex is known as the I<vertex eccentricity>. -If the graph is unconnected, returns Inf. + +If the graph is unconnected, single-vertex, or empty graph, returns Inf. =back @@ -2096,6 +2102,10 @@ or C<edges_fill> so that there is a possibility of the filling process terminating. +B<NOTE>: a known problem with randomness in openbsd pre-perl-5.20 is that +using a seed does not give you deterministic randomness. This affects any +Perl code, not just Graph. + =head2 Attributes You can attach free-form attributes (key-value pairs, in effect a full diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/t/73_diameter.t new/Graph-0.9703/t/73_diameter.t --- old/Graph-0.97/t/73_diameter.t 2015-09-22 15:19:08.000000000 +0200 +++ new/Graph-0.9703/t/73_diameter.t 2015-09-26 03:31:04.000000000 +0200 @@ -1,4 +1,4 @@ -use Test::More tests => 65; +use Test::More tests => 77; use Graph; use Graph::Directed; @@ -7,15 +7,27 @@ my $g = Graph->new(undirected => 1); is($g->diameter, undef); +is($g->radius, Graph::Infinity); +is($g->shortest_path, undef); +is_deeply([$g->shortest_path], []); is_deeply([sort $g->center_vertices], []); +is($g->vertex_eccentricity('a'), Graph::Infinity); $g->add_vertex('a'); is($g->diameter, undef); +is($g->radius, Graph::Infinity); +is($g->shortest_path, undef); +is_deeply([$g->shortest_path], []); is_deeply([sort $g->center_vertices], []); +is($g->vertex_eccentricity('a'), Graph::Infinity); $g->add_vertex('b'); is($g->diameter, undef); +is($g->radius, Graph::Infinity); +is($g->shortest_path, undef); +is_deeply([$g->shortest_path], []); is_deeply([sort $g->center_vertices], []); +is($g->vertex_eccentricity('b'), Graph::Infinity); $g->add_edge(qw(e a)); $g->add_edge(qw(a r)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Graph-0.97/t/74_random.t new/Graph-0.9703/t/74_random.t --- old/Graph-0.97/t/74_random.t 2014-03-09 10:45:01.000000000 +0100 +++ new/Graph-0.9703/t/74_random.t 2015-09-29 00:45:58.000000000 +0200 @@ -71,8 +71,14 @@ my $g4d = Graph->random_graph(vertices => 10, random_seed => 1235); my $g4e = Graph->random_graph(vertices => 10); -is ($g4a, $g4b); -is ($g4c, $g4d); +SKIP: { + # http://undeadly.org/cgi?action=article&sid=20141118170028 + # http://www.openbsd.org/plus58.html + skip("openbsd rand() was undeterministic before Perl 5.20", 2) + if $^O eq 'openbsd' && $] < 5.020; + is ($g4a, $g4b); + is ($g4c, $g4d); +} isnt($g4a, $g4c); isnt($g4a, $g4d); isnt($g4a, $g4e);
