summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorJoe Slater <joe.slater@windriver.com>2020-03-05 14:04:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-06 08:19:18 +0000
commit6e3e269f91228659708ecfef4241158e1b15e4c5 (patch)
tree380b1d3f716ca18ae82348016063efdbe7c97d49 /meta/recipes-devtools
parent1f71b9edcb84715eb3da4e9f4ab44966a7be5c60 (diff)
downloadpoky-6e3e269f91228659708ecfef4241158e1b15e4c5.tar.gz
libdnf: fix deprecation warning
Backport from libdnf. Fix is in version 0.35.2. (From OE-Core rev: bc9402d77a982ff71bd919837b4736f586aa04cf) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch71
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_0.28.1.bb1
2 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch b/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
new file mode 100644
index 0000000000..3a3e02f352
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/fix-deprecation-warning.patch
@@ -0,0 +1,71 @@
1From 66d9b2ba3fbc7b04f2b5ad9d0e5371340c037b5f Mon Sep 17 00:00:00 2001
2From: Marek Blaha <mblaha@redhat.com>
3Date: Wed, 10 Jul 2019 10:11:01 +0200
4Subject: [oe-core][PATCH 1/1] Fix Python 3.8 deprecation warning
5 (RhBug:1724244)
6
7This deprecation warning was introduced in Python 3.8 by
8https://bugs.python.org/issue36381:
9
10/usr/lib/python3.8/site-packages/dnf/package.py:57: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
11 return super(Package, self).chksum
12
13https://bugzilla.redhat.com/show_bug.cgi?id=1724244
14---
15 python/hawkey/package-py.cpp | 3 ++-
16 python/hawkey/packagedelta-py.cpp | 3 ++-
17 2 files changed, 4 insertions(+), 2 deletions(-)
18---
19
20Unchanged. Appears in version 0.35.2.
21
22Upstream-Status: Backport [git://github.com/rpm-software-management/libdnf.git]
23
24Signed-off-by: Joe Slater <joe.slater@windriver.com>
25
26
27diff --git a/python/hawkey/package-py.cpp b/python/hawkey/package-py.cpp
28index 5102bba..68e03cb 100644
29--- a/python/hawkey/package-py.cpp
30+++ b/python/hawkey/package-py.cpp
31@@ -18,6 +18,7 @@
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35+#define PY_SSIZE_T_CLEAN
36 #include <Python.h>
37 #include <stdio.h>
38
39@@ -251,7 +252,7 @@ get_chksum(_PackageObject *self, void *closure)
40 #if PY_MAJOR_VERSION < 3
41 res = Py_BuildValue("is#", type, cs, checksum_length);
42 #else
43- res = Py_BuildValue("iy#", type, cs, checksum_length);
44+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
45 #endif
46
47 return res;
48diff --git a/python/hawkey/packagedelta-py.cpp b/python/hawkey/packagedelta-py.cpp
49index ca1cb7d..1a64836 100644
50--- a/python/hawkey/packagedelta-py.cpp
51+++ b/python/hawkey/packagedelta-py.cpp
52@@ -18,6 +18,7 @@
53 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
54 */
55
56+#define PY_SSIZE_T_CLEAN
57 #include <Python.h>
58
59 // hawkey
60@@ -92,7 +93,7 @@ get_chksum(_PackageDeltaObject *self, void *closure)
61 #if PY_MAJOR_VERSION < 3
62 res = Py_BuildValue("is#", type, cs, checksum_length);
63 #else
64- res = Py_BuildValue("iy#", type, cs, checksum_length);
65+ res = Py_BuildValue("iy#", type, cs, (Py_ssize_t)checksum_length);
66 #endif
67
68 return res;
69--
702.7.4
71
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
index d498347094..163a2eec26 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -8,6 +8,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf \
8 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ 8 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
9 file://0001-Add-WITH_TESTS-option.patch \ 9 file://0001-Add-WITH_TESTS-option.patch \
10 file://0001-include-stdexcept-for-runtime_error.patch \ 10 file://0001-include-stdexcept-for-runtime_error.patch \
11 file://fix-deprecation-warning.patch \
11 " 12 "
12 13
13SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77" 14SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"