Skip to content

Commit

Permalink
dev-ada/libadalang: fix usage of pyyaml load
Browse files Browse the repository at this point in the history
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 c3c9600 commit 72ed653
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dev-ada/libadalang/files/libadalang-2019-pyyaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/ada/testsuite/testsuite_support/polyfill.py 2020-03-26 20:52:45.678476467 +0100
+++ b/ada/testsuite/testsuite_support/polyfill.py 2020-03-26 20:53:13.612979979 +0100
@@ -368,7 +368,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)
1 change: 1 addition & 0 deletions dev-ada/libadalang/libadalang-2018-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pkg_setup() {
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${PN}-2017-gentoo.patch
"${FILESDIR}"/${PN}-2019-pyyaml.patch
)

src_configure() {
Expand Down
5 changes: 4 additions & 1 deletion dev-ada/libadalang/libadalang-2019-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ pkg_setup() {
ada_pkg_setup
}

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

src_configure() {
ada/manage.py -v debug generate || die
Expand Down

0 comments on commit 72ed653

Please sign in to comment.