aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/libcyaml-libyaml-compat.patch
blob: dcb8cb51b862b60895cdfa1d49fb10421c1e11f6 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Fix build against libyaml 0.2.5.

Taken from upstream:
https://github.com/tlsa/libcyaml/commit/0e947264b947f51f7ea785068637c4bfce5d4171

diff --git a/test/units/save.c b/test/units/save.c
--- a/test/units/save.c
+++ b/test/units/save.c
@@ -3476,7 +3476,7 @@ static bool test_save_sequence_null_values_int(
 		ttest_report_ctx_t *report,
 		const cyaml_config_t *config)
 {
-	static const unsigned char ref[] =
+	static const unsigned char ref1[] =
 		"---\n"
 		"- 7\n"
 		"- 6\n"
@@ -3487,6 +3487,18 @@ static bool test_save_sequence_null_values_int(
 		"- \n"
 		"- 0\n"
 		"...\n";
+	/* As of libyaml 0.2.5, trailing spaces are not emitted. */
+	static const unsigned char ref2[] =
+		"---\n"
+		"- 7\n"
+		"- 6\n"
+		"- 5\n"
+		"-\n"
+		"- 3\n"
+		"- 2\n"
+		"-\n"
+		"- 0\n"
+		"...\n";
 	static const int d[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
 	static const int *data[] = { d + 0, d + 1, d + 2, NULL,
 	                             d + 4, d + 5, NULL, d + 7, };
@@ -3515,11 +3527,12 @@ static bool test_save_sequence_null_values_int(
 		return ttest_fail(&tc, cyaml_strerror(err));
 	}
 
-	if (len != YAML_LEN(ref) || memcmp(ref, buffer, len) != 0) {
+	if ((len != YAML_LEN(ref1) || memcmp(ref1, buffer, len) != 0) &&
+	    (len != YAML_LEN(ref2) || memcmp(ref2, buffer, len) != 0)) {
 		return ttest_fail(&tc, "Bad data:\n"
 				"EXPECTED (%zu):\n\n%.*s\n\n"
 				"GOT (%zu):\n\n%.*s\n",
-				YAML_LEN(ref), YAML_LEN(ref), ref,
+				YAML_LEN(ref1), YAML_LEN(ref1), ref1,
 				len, len, buffer);
 	}
 
f1d11e9dd8dcf32c2f171f746f087e9354934'>installer: Keep PATH inside the install container....* gnu/installer/final.scm (install-system): Set PATH inside the container. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Josselin Poiret 2022-02-02installer: Use new installer-log-line everywhere....* gnu/installer.scm (installer-program) * gnu/installer/final.scm (install-locale) * gnu/installer/newt.scm (init) * gnu/installer/newt/final.scm (run-final-page) * gnu/installer/newt/page.scm (run-form-with-clients) * gnu/installer/newt/partition.scm (run-partitioning-page) * gnu/installer/parted.scm (eligible-devices, mkpart, luks-format-and-open, luks-close, mount-user-partitions, umount-user-partitions, free-parted): * gnu/installer/steps.scm (run-installer-steps): * gnu/installer/utils.scm (run-command, send-to-clients): Use it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Josselin Poiret 2022-01-14installer: Install the locale before mounting the cow-store....Fixes: <https://issues.guix.gnu.org/52831>. Make sure to install the en_US.utf8 fallback locale if the selected locale is not supported. * gnu/installer/final.scm (install-locale): New procedure. (install-system): Call it. Mathieu Othacehe 2022-01-14installer: Do not set the locale in run-command....Installing the locale inside the container, once the cow-store is mounted, causes the process to keep opened locale files that can later prevent the cow-store umount. * gnu/installer/utils.scm (run-command): Remove locale argument. * gnu/installer/final.scm (install-system): Adapt it. Mathieu Othacehe 2022-01-14installer: Remove an unused procedure....* gnu/installer/final.scm (kill-cow-users): Remove it. Mathieu Othacehe