Skip to content

Commit

Permalink
dev-ada/langkit: fix usage of pyyaml
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/713340
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <[email protected]>
  • Loading branch information
atupone committed Mar 26, 2020
1 parent 78387a9 commit 9581a0b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
11 changes: 11 additions & 0 deletions dev-ada/langkit/files/langkit-2019-pyyaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/testsuite/testsuite_support/polyfill.py 2020-03-26 20:43:40.861154768 +0100
+++ b/testsuite/testsuite_support/polyfill.py 2020-03-26 20:44:07.874675123 +0100
@@ -376,7 +376,7 @@
# First load data provided by this testcase
try:
with open(os.path.join(test_dir, 'test.yaml'), 'r') as f:
- test_data = yaml.load(f)
+ test_data = yaml.safe_load(f)
except (IOError, yaml.error.YAMLError) as exc:
status = 'PROBLEM'
message = 'Invalid test.yaml: {}'.format(exc)
8 changes: 5 additions & 3 deletions dev-ada/langkit/langkit-2018.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
Expand All @@ -24,7 +24,6 @@ DEPEND="${PYTHON_DEPS}
dev-ada/gnatcoll-bindings[iconv,shared]
dev-python/mako
dev-python/pyyaml
<dev-python/pyyaml-5
dev-python/enum34
dev-python/funcy
dev-python/docutils
Expand All @@ -33,7 +32,10 @@ RDEPEND="${DEPEND}"

S="${WORKDIR}"/${MYP}-src

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${PN}-2019-pyyaml.patch
)

src_test() {
testsuite/testsuite.py -j $(makeopts_jobs) --show-error-output | tee testsuite.log
Expand Down
9 changes: 6 additions & 3 deletions dev-ada/langkit/langkit-2019.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
Expand All @@ -24,7 +24,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
dev-ada/gnatcoll-bindings[iconv,shared]
dev-python/mako
<dev-python/pyyaml-5
dev-python/pyyaml
dev-python/enum34
dev-python/funcy
dev-python/docutils"
Expand All @@ -34,7 +34,10 @@ DEPEND="${RDEPEND}

S="${WORKDIR}"/${MYP}-src

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-pyyaml.patch
)

src_test() {
testsuite/testsuite.py -j $(makeopts_jobs) --show-error-output | tee testsuite.log
Expand Down

0 comments on commit 9581a0b

Please sign in to comment.