dev-ada/libadalang: fix usage of pyyaml load
authorTupone Alfredo <tupone@gentoo.org>
Thu, 26 Mar 2020 20:02:28 +0000 (21:02 +0100)
committerTupone Alfredo <tupone@gentoo.org>
Thu, 26 Mar 2020 20:02:28 +0000 (21:02 +0100)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
dev-ada/libadalang/files/libadalang-2019-pyyaml.patch [new file with mode: 0644]
dev-ada/libadalang/libadalang-2018-r2.ebuild
dev-ada/libadalang/libadalang-2019-r1.ebuild

diff --git a/dev-ada/libadalang/files/libadalang-2019-pyyaml.patch b/dev-ada/libadalang/files/libadalang-2019-pyyaml.patch
new file mode 100644 (file)
index 0000000..ad78d5a
--- /dev/null
@@ -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)
index bbb04ac9fc4f7eb6a06bf49a20928ce3fd508e82..976d27263cc33148347315fa19a149cf974aed11 100644 (file)
@@ -39,6 +39,7 @@ pkg_setup() {
 PATCHES=(
        "${FILESDIR}"/${P}-gentoo.patch
        "${FILESDIR}"/${PN}-2017-gentoo.patch
+       "${FILESDIR}"/${PN}-2019-pyyaml.patch
 )
 
 src_configure() {
index 2d2c39e9b8db7090507cd10c9ec0a1170db8bad6..7acb3a03a872712bb7d35d8de931462f48a59e8d 100644 (file)
@@ -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