Merge lp:~scarneiro/ubuntu/trusty/clhep/fix-for-double-comparison into lp:ubuntu/trusty-proposed/clhep

Proposed by Sebastian Carneiro
Status: Merged
Merge reported by: Dmitry Shachnev
Merged at revision: not available
Proposed branch: lp:~scarneiro/ubuntu/trusty/clhep/fix-for-double-comparison
Merge into: lp:ubuntu/trusty-proposed/clhep
Diff against target: 71 lines (+51/-0)
3 files modified
debian/changelog (+9/-0)
debian/patches/fix-double-comparison.patch (+41/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~scarneiro/ubuntu/trusty/clhep/fix-for-double-comparison
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+219125@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Utopic now has Philipp's NMU synced: https://launchpad.net/ubuntu/+source/clhep/2.1.4.1-1.1.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-12-14 16:33:36 +0000
3+++ debian/changelog 2014-05-11 17:45:07 +0000
4@@ -1,3 +1,12 @@
5+clhep (2.1.4.1-1ubuntu1) trusty-proposed; urgency=medium
6+
7+ * Fix FTBFS because of failed test (LP: #1251844)
8+ - debian/patches/fix-double-comparison.patch:
9+ changes double comparison subroutine. Patch submitted in
10+ Debian by Philipp Kern <pkern@debian.org>.
11+
12+ -- Sebastian Carneiro <scarneiro@fibertel.com.ar> Sun, 11 May 2014 13:36:25 -0300
13+
14 clhep (2.1.4.1-1) unstable; urgency=low
15
16 * New upstream release. (Closes: #713377)
17
18=== added file 'debian/patches/fix-double-comparison.patch'
19--- debian/patches/fix-double-comparison.patch 1970-01-01 00:00:00 +0000
20+++ debian/patches/fix-double-comparison.patch 2014-05-11 17:45:07 +0000
21@@ -0,0 +1,41 @@
22+Description: fix double comparision in testBug58950.cc
23+ The double comparision using != failed on i386 due to the way floating
24+ point works. The other test cases already ship this equals function;
25+ copy it and use it.
26+Author: Philipp Kern <pkern@debian.org>
27+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733301
28+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1251844
29+Forwarded: not-needed
30+Last-Update: 2014-05-10
31+---
32+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
33+Index: fix-double-comparison/Random/test/testBug58950.cc
34+===================================================================
35+--- fix-double-comparison.orig/Random/test/testBug58950.cc 2014-05-11 14:10:45.651267655 -0300
36++++ fix-double-comparison/Random/test/testBug58950.cc 2014-05-11 14:12:46.755265486 -0300
37+@@ -14,6 +14,16 @@
38+ #include "CLHEP/Random/Random.h"
39+ #include "pretend.h"
40+
41++// Absolutely Safe Equals Without Registers Screwing Us Up
42++bool equals01(const std::vector<double> &ab) {
43++ return ab[1]==ab[0];
44++}
45++bool equals(double a, double b) {
46++ std::vector<double> ab(2);
47++ ab[0]=a; ab[1]=b;
48++ return (equals01(ab));
49++}
50++
51+ bool printCheck( int & i, double & r, std::ofstream & os )
52+ {
53+ os << i << " " << r << std::endl;
54+@@ -151,7 +161,7 @@
55+ g->setTheSeeds(seeds);
56+ for (int i=0; i < nNumbers; ++i) {
57+ double r = g->flat();
58+- if(v[i] != r ) {
59++ if(! equals(v[i], r)) {
60+ ++badcount;
61+ std::cerr << " rollback fails: i, v[i], r "
62+ << i << " " << v[i] << " " << r << std::endl;
63
64=== modified file 'debian/patches/series'
65--- debian/patches/series 2013-12-14 16:33:36 +0000
66+++ debian/patches/series 2014-05-11 17:45:07 +0000
67@@ -2,3 +2,4 @@
68 doxygen.conf
69 clhep-config.patch
70 tests.patch
71+fix-double-comparison.patch

Subscribers

People subscribed via source and target branches