Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ada/libadalang/files/, dev-ada/libadalang/
Date: Thu, 26 Mar 2020 20:02:46
Message-Id: 1585252948.72ed653257aaf394555b2d0b85e74b5a7481212f.tupone@gentoo
commit:     72ed653257aaf394555b2d0b85e74b5a7481212f
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 26 20:02:28 2020 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Mar 26 20:02:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72ed6532

dev-ada/libadalang: fix usage of pyyaml load

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ada/libadalang/files/libadalang-2019-pyyaml.patch | 11 +++++++++++
 dev-ada/libadalang/libadalang-2018-r2.ebuild          |  1 +
 dev-ada/libadalang/libadalang-2019-r1.ebuild          |  5 ++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/dev-ada/libadalang/files/libadalang-2019-pyyaml.patch b/dev-ada/libadalang/files/libadalang-2019-pyyaml.patch
new file mode 100644
index 00000000000..ad78d5af1f3
--- /dev/null
+++ b/dev-ada/libadalang/files/libadalang-2019-pyyaml.patch
@@ -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)

diff --git a/dev-ada/libadalang/libadalang-2018-r2.ebuild b/dev-ada/libadalang/libadalang-2018-r2.ebuild
index bbb04ac9fc4..976d27263cc 100644
--- a/dev-ada/libadalang/libadalang-2018-r2.ebuild
+++ b/dev-ada/libadalang/libadalang-2018-r2.ebuild
@@ -39,6 +39,7 @@ pkg_setup() {
 PATCHES=(
 	"${FILESDIR}"/${P}-gentoo.patch
 	"${FILESDIR}"/${PN}-2017-gentoo.patch
+	"${FILESDIR}"/${PN}-2019-pyyaml.patch
 )
 
 src_configure() {

diff --git a/dev-ada/libadalang/libadalang-2019-r1.ebuild b/dev-ada/libadalang/libadalang-2019-r1.ebuild
index 2d2c39e9b8d..7acb3a03a87 100644
--- a/dev-ada/libadalang/libadalang-2019-r1.ebuild
+++ b/dev-ada/libadalang/libadalang-2019-r1.ebuild
@@ -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