diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-21 07:09:44 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2018-11-21 07:09:44 +0000 |
commit | 1136c95ad6bd6474d3d72a37d99c2353c289ad97 (patch) | |
tree | 7e36bd1f80120f2043cf9357f0745ae7ececdae6 | |
parent | 75c78e3366d98013cc1d0f897db658243cceb6c5 (diff) | |
parent | 78d40257bd969b58407a251d9746e8fcf0fe4879 (diff) | |
download | packages-1136c95ad6bd6474d3d72a37d99c2353c289ad97.tar.gz packages-1136c95ad6bd6474d3d72a37d99c2353c289ad97.tar.bz2 packages-1136c95ad6bd6474d3d72a37d99c2353c289ad97.tar.xz packages-1136c95ad6bd6474d3d72a37d99c2353c289ad97.zip |
Merge branch 'fix-yaml.2018-11-20' into 'master'
system/yaml: Backport emitter fix from v0.2.2-pre1
These patches fix an emitter problem that prevents PyYAML 3.13's test
suite from passing. They should not be necessary when libyaml v0.2.2 is
released.
Patch-Author: James Clarke <jrtc27@jrtc27.com>
See-Also: https://github.com/yaml/pyyaml/issues/184
See-Also: https://github.com/yaml/libyaml/issues/60#issuecomment-311836709
See merge request !111
-rw-r--r-- | system/yaml/APKBUILD | 10 | ||||
-rw-r--r-- | system/yaml/fix-emitter-0.2.1.patch | 35 | ||||
-rw-r--r-- | system/yaml/skip-trailing-doc-term-0.2.1.patch | 30 |
3 files changed, 72 insertions, 3 deletions
diff --git a/system/yaml/APKBUILD b/system/yaml/APKBUILD index 323ac3b40..4dfac01b3 100644 --- a/system/yaml/APKBUILD +++ b/system/yaml/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=yaml pkgver=0.2.1 -pkgrel=0 +pkgrel=1 pkgdesc="YAML 1.1 parser and emitter written in C" url="https://pyyaml.org/wiki/LibYAML" arch="all" @@ -10,7 +10,9 @@ license="MIT" depends="" makedepends="" subpackages="$pkgname-dev" -source="http://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz" +source="http://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz + fix-emitter-$pkgver.patch + skip-trailing-doc-term-$pkgver.patch" build() { cd "$builddir" @@ -35,4 +37,6 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="97ebeea2a2c877b24de2e1ffbf175d07d97d5c8b90e06d21fd057e1114d10b96c04fd92c2ed4e956db751b7ac1686b3fd5778927912ca5bb0d096908a1351235 yaml-0.2.1.tar.gz" +sha512sums="97ebeea2a2c877b24de2e1ffbf175d07d97d5c8b90e06d21fd057e1114d10b96c04fd92c2ed4e956db751b7ac1686b3fd5778927912ca5bb0d096908a1351235 yaml-0.2.1.tar.gz +ad35c3b893cfeb33fab748b39b06ad0c54215941f68d0df591b8e4e4edc3b67f27ea3206321b7621c0e9e6faf749255fd80209da017c77a91d8de68eec54fd2b fix-emitter-0.2.1.patch +715ad72a4a74b19fdf03b8be96b9e5c3801bab5475eeee4c98b109eabcf86e193d5884ad6466b6765ccc2174ebaedade25e43fff711d9522fb8f370bcea5eef4 skip-trailing-doc-term-0.2.1.patch" diff --git a/system/yaml/fix-emitter-0.2.1.patch b/system/yaml/fix-emitter-0.2.1.patch new file mode 100644 index 000000000..f3614e349 --- /dev/null +++ b/system/yaml/fix-emitter-0.2.1.patch @@ -0,0 +1,35 @@ +Contributor Note: This patch will be part of v0.2.2 which hasn't been +formally released as of 2018-11-20. It should be removed once this +package is version bumped. + +From e5ebb70a01cc0fbd9e519050d51d704f58c2a33d Mon Sep 17 00:00:00 2001 +From: James Clarke <jrtc27@jrtc27.com> +Date: Thu, 29 Jun 2017 02:26:09 +0100 +Subject: [PATCH 2/2] Skip trailing document terminator at the end of the + stream + +--- + src/emitter.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/src/emitter.c b/src/emitter.c +index c593a7d..1502590 100644 +--- a/src/emitter.c ++++ b/src/emitter.c +@@ -649,14 +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; + +-- +2.13.2 diff --git a/system/yaml/skip-trailing-doc-term-0.2.1.patch b/system/yaml/skip-trailing-doc-term-0.2.1.patch new file mode 100644 index 000000000..7e10cd9ea --- /dev/null +++ b/system/yaml/skip-trailing-doc-term-0.2.1.patch @@ -0,0 +1,30 @@ +Contributor Note: As with fix-emitter-0.2.1.patch, this patch should +not be necessary when v0.2.2 is released. + +From 7c2e6f47e1b12ca3dfa9ea2f6c65e9bd8a02e8c8 Mon Sep 17 00:00:00 2001 +From: James Clarke <jrtc27@jrtc27.com> +Date: Thu, 29 Jun 2017 02:24:53 +0100 +Subject: [PATCH 1/2] 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 a5b7ff8..c593a7d 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; + } +-- +2.13.2 |