From 12cf39b97e910a4009afea3e84461c6c286e0edb568dae8ff4b33d793fe978ca Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 28 Jan 2019 12:34:06 +0000 Subject: [PATCH] Accepting request 667048 from home:iznogood:branches:devel:libraries:c_c++ - Add libyaml-revert-emitter-changes.patch: Revert "This code is not needed and breaks tests" (gh#yaml/libyaml#122). Fixes build of python-PyYAML. OBS-URL: https://build.opensuse.org/request/show/667048 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyaml?expand=0&rev=20 --- libyaml-revert-emitter-changes.patch | 64 ++++++++++++++++++++++++++++ libyaml.changes | 6 +++ libyaml.spec | 5 ++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 libyaml-revert-emitter-changes.patch diff --git a/libyaml-revert-emitter-changes.patch b/libyaml-revert-emitter-changes.patch new file mode 100644 index 0000000..6acabe5 --- /dev/null +++ b/libyaml-revert-emitter-changes.patch @@ -0,0 +1,64 @@ +From 8ee83c0da22fe9aa7dea667be8f899a7e32ffb83 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tina=20M=C3=BCller?= +Date: Fri, 29 Jun 2018 21:44:19 +0200 +Subject: [PATCH 1/2] Revert removing of open_ended after top level plain + scalar + +See also issue #60 + +Revert "This code is not needed and breaks tests" + +This reverts commit 56400d976a1999156b1abfd674c3122843980260. +--- + src/emitter.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/emitter.c b/src/emitter.c +index d31e075..32fe07c 100644 +--- a/src/emitter.c ++++ b/src/emitter.c +@@ -1946,6 +1946,10 @@ yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter, + + emitter->whitespace = 0; + emitter->indention = 0; ++ if (emitter->root_context) ++ { ++ emitter->open_ended = 1; ++ } + + return 1; + } + +From 56f4b17221868593d6903ee58d6d679b690cf4df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tina=20M=C3=BCller?= +Date: Fri, 29 Jun 2018 23:16:26 +0200 +Subject: [PATCH 2/2] Don't emit document-end marker at the end of stream + +(only when explicitly requested) + +@jrtc27++ for the patch. + +See #60 +--- + src/emitter.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/emitter.c b/src/emitter.c +index 32fe07c..2744495 100644 +--- a/src/emitter.c ++++ b/src/emitter.c +@@ -649,13 +649,6 @@ yaml_emitter_emit_document_start(yaml_emitter_t *emitter, + + else if (event->type == YAML_STREAM_END_EVENT) + { +- if (emitter->open_ended) +- { +- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0)) +- return 0; +- if (!yaml_emitter_write_indent(emitter)) +- return 0; +- } + + if (!yaml_emitter_flush(emitter)) + return 0; + diff --git a/libyaml.changes b/libyaml.changes index 2dde611..a0d5758 100644 --- a/libyaml.changes +++ b/libyaml.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 17 13:23:23 UTC 2019 - bjorn.lie@gmail.com + +- Add libyaml-revert-emitter-changes.patch: Revert "This code is + not needed and breaks tests" (gh#yaml/libyaml#122). + ------------------------------------------------------------------- Tue Dec 4 08:48:50 UTC 2018 - Ondřej Súkup diff --git a/libyaml.spec b/libyaml.spec index 37d14bf..8dcbc0b 100644 --- a/libyaml.spec +++ b/libyaml.spec @@ -1,7 +1,7 @@ # # spec file for package libyaml # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,8 @@ License: MIT Group: Development/Libraries/C and C++ URL: http://pyyaml.org/wiki/LibYAML Source: http://pyyaml.org/download/libyaml/yaml-%{version}.tar.gz +# PATCH-FIX-UPSTREAM libyaml-revert-emitter-changes.patch -- gh#yaml/libyaml#122 +Patch: libyaml-revert-emitter-changes.patch BuildRequires: pkgconfig %description @@ -52,6 +54,7 @@ This package holds the development files for libyaml. %prep %setup -q -n yaml-%{version} +%patch -p1 %build %configure --with-pic --disable-static