teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.12.90-remove-pystring.patch

Lubos Kardos d407fb
From aec4f88ed585aedae1b35f447ee730a9054d6a4a Mon Sep 17 00:00:00 2001
Lubos Kardos d407fb
From: Thierry Vignaud <thierry.vignaud@gmail.com>
Lubos Kardos d407fb
Date: Mon, 10 Aug 2015 04:38:47 -0400
Lubos Kardos d407fb
Subject: [PATCH] Fix last occurence of PyString
Lubos Kardos d407fb
Lubos Kardos d407fb
This should have been done in
Lubos Kardos d407fb
commit 1866fc41c8fdf5a82705cee7f1043d5fb634c3be
Lubos Kardos d407fb
This fixes:
Lubos Kardos d407fb
Lubos Kardos d407fb
$ python3 -c 'import rpm._rpmb'
Lubos Kardos d407fb
Traceback (most recent call last):
Lubos Kardos d407fb
  File "<string>", line 1, in <module>
Lubos Kardos d407fb
ImportError: /usr/lib64/python3.4/site-packages/rpm/_rpmb.cpython-34m.so: undefined symbol: PyString_FromString
Lubos Kardos d407fb
---
Lubos Kardos d407fb
 python/spec-py.c | 2 +-
Lubos Kardos d407fb
 1 file changed, 1 insertion(+), 1 deletion(-)
Lubos Kardos d407fb
Lubos Kardos d407fb
diff --git a/python/spec-py.c b/python/spec-py.c
Lubos Kardos d407fb
index 728b63c..f710f5c 100644
Lubos Kardos d407fb
--- a/python/spec-py.c
Lubos Kardos d407fb
+++ b/python/spec-py.c
Lubos Kardos d407fb
@@ -51,7 +51,7 @@ static PyObject *pkgGetSection(rpmSpecPkg pkg, int section)
Lubos Kardos d407fb
 {
Lubos Kardos d407fb
     char *sect = rpmSpecPkgGetSection(pkg, section);
Lubos Kardos d407fb
     if (sect != NULL) {
Lubos Kardos d407fb
-        PyObject *ps = PyString_FromString(sect);
Lubos Kardos d407fb
+        PyObject *ps = PyBytes_FromString(sect);
Lubos Kardos d407fb
         free(sect);
Lubos Kardos d407fb
         if (ps != NULL)
Lubos Kardos d407fb
             return ps;
Lubos Kardos d407fb
-- 
Lubos Kardos d407fb
1.9.3
Lubos Kardos d407fb