newt: Remove python_init_once.patch 11657/head
authorJeffery To <jeffery.to@gmail.com>
Tue, 24 Mar 2020 07:51:55 +0000 (15:51 +0800)
committerJeffery To <jeffery.to@gmail.com>
Tue, 24 Mar 2020 07:51:55 +0000 (15:51 +0800)
It was pointed out in #11504 that the code in python_init_once.patch is
incorrect; the patch does not prevent newtInit() from being called more
than once (in fact it is called twice the first time initScreen() is
called).

Testing without the patch, using the example code from the corresponding
Debian bug report[1], did not result in any segfaults.

This removes the patch from the package build.

Supersedes #11504.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960#5

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
libs/newt/Makefile
libs/newt/patches/python_init_once.patch [deleted file]

index 3f10fb0c13f1ceb1d58681a7848984717b12c9cc..10abe55f4ba67a4dad0ff8a08da433e2bd99f815 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=newt
 PKG_VERSION:=0.52.21
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://releases.pagure.org/newt
diff --git a/libs/newt/patches/python_init_once.patch b/libs/newt/patches/python_init_once.patch
deleted file mode 100644 (file)
index 3d52b44..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Author: Alastair McKinstry <mckinstry@debian.org>
-Description: newtInit() should only be called once
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960
-Forwarded: no
-Last-Updated: 2014-06-11
-
---- a/snack.c
-+++ b/snack.c
-@@ -377,10 +377,15 @@ static snackWidget * snackWidgetNew (voi
- }
- static PyObject * initScreen(PyObject * s, PyObject * args) {
-+    static int init_newt = 1;
-     suspend.cb = NULL;
-     suspend.data = NULL;
-     
-     newtInit();
-+    if (init_newt) { 
-+      newtInit();
-+      init_newt = 0;
-+    }
-     newtCls();
-     Py_INCREF(Py_None);