Control: tags 959573 + patch
Control: tags 959573 + pending

Dear maintainer,

I've prepared an NMU for facter (versioned as 3.11.0-4.2) and
uploaded it to DELAYED/1. Please feel free to tell me if I
should delay it longer.

Cheers
-- 
Sebastian Ramacher
diff -Nru facter-3.11.0/debian/changelog facter-3.11.0/debian/changelog
--- facter-3.11.0/debian/changelog	2020-04-13 21:45:20.000000000 +0200
+++ facter-3.11.0/debian/changelog	2020-06-17 23:21:32.000000000 +0200
@@ -1,3 +1,10 @@
+facter (3.11.0-4.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches: Fix tests with yaml-cpp 0.6.3 (Closes: #959573)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Wed, 17 Jun 2020 23:21:32 +0200
+
 facter (3.11.0-4.1) unstable; urgency=medium
 
   * Non-maintainer upload
diff -Nru facter-3.11.0/debian/patches/fix-double-tests.patch facter-3.11.0/debian/patches/fix-double-tests.patch
--- facter-3.11.0/debian/patches/fix-double-tests.patch	1970-01-01 01:00:00.000000000 +0100
+++ facter-3.11.0/debian/patches/fix-double-tests.patch	2020-06-17 23:21:16.000000000 +0200
@@ -0,0 +1,49 @@
+Description: Fix yaml tests with double values.
+ As of yaml-cpp 0.6.3, the maximal precision for serializing floating
+ point values is used. See
+ https://github.com/jbeder/yaml-cpp/commit/abf941b20d21342cd207df0f8ffe09f41a4d3042
+ .
+ Since 42.4242 cannot be precisely represented with binary floating
+ point numbers, the tests fail. 42.4345, however, can be precisely
+ represented, so use this value for the tests.
+Author: Sebastian Ramacher <sramac...@debian.org>
+Bug-Debian: https://bugs.debian.org/959573
+Last-Update: 2020-06-17
+
+--- a/lib/tests/facts/double_value.cc
++++ b/lib/tests/facts/double_value.cc
+@@ -12,29 +12,29 @@
+ using namespace YAML;
+ 
+ SCENARIO("using a double fact value") {
+-    double_value value(42.4242);
+-    REQUIRE(value.value() == Approx(42.4242));
++    double_value value(42.4345);
++    REQUIRE(value.value() == Approx(42.4345));
+     WHEN("serialized to JSON") {
+         THEN("it should have the same value") {
+             json_value json;
+             json_allocator allocator;
+             value.to_json(allocator, json);
+             REQUIRE(json.IsNumber());
+-            REQUIRE(json.GetDouble() == Approx(42.4242));
++            REQUIRE(json.GetDouble() == Approx(42.4345));
+         }
+     }
+     WHEN("serialized to YAML") {
+         THEN("it should have the same value") {
+             Emitter emitter;
+             value.write(emitter);
+-            REQUIRE(string(emitter.c_str()) == "42.4242");
++            REQUIRE(string(emitter.c_str()) == "42.4345");
+         }
+     }
+     WHEN("serialized to text") {
+         THEN("it should have the same value") {
+             ostringstream stream;
+             value.write(stream);
+-            REQUIRE(stream.str() == "42.4242");
++            REQUIRE(stream.str() == "42.4345");
+         }
+     }
+ }
diff -Nru facter-3.11.0/debian/patches/series facter-3.11.0/debian/patches/series
--- facter-3.11.0/debian/patches/series	2020-04-13 21:45:20.000000000 +0200
+++ facter-3.11.0/debian/patches/series	2020-06-17 22:44:37.000000000 +0200
@@ -5,3 +5,4 @@
 0005-fix-custom-facts-overriding-core.patch
 0006-FACT-1916-fix-route-parsing-on-Linux.patch
 0007-Don-t-run-rspec-via-bundler.patch
+fix-double-tests.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to