aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2019-11-14 19:31:23 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2019-11-14 19:31:40 +0100
commitbf767fc9826197c5b9b44d3424c9aa0bc0361096 (patch)
tree5c01cc5f79da6c8771a18c91ed114c84187f9265 /main
parente4f618c13f70d7c419aaffe7fd9f789a214bb4cb (diff)
downloadaports-bf767fc9826197c5b9b44d3424c9aa0bc0361096.tar.bz2
aports-bf767fc9826197c5b9b44d3424c9aa0bc0361096.tar.xz
main/gdb: fix compatibility with python 3.8
Diffstat (limited to 'main')
-rw-r--r--main/gdb/APKBUILD6
-rw-r--r--main/gdb/python-3.8.patch33
2 files changed, 37 insertions, 2 deletions
diff --git a/main/gdb/APKBUILD b/main/gdb/APKBUILD
index 2f7ff9f66b..2883ea6e45 100644
--- a/main/gdb/APKBUILD
+++ b/main/gdb/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdb
pkgver=8.3.1
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Debugger"
url="https://www.gnu.org/software/gdb/"
arch="all"
@@ -15,6 +15,7 @@ source="https://ftp.gnu.org/gnu/gdb/gdb-$pkgver.tar.xz
ppc-musl.patch
ppc-ptregs.patch
musl-signals.patch
+ python-3.8.patch
"
build () {
@@ -60,4 +61,5 @@ sha512sums="9053a2dc6b9eb921907afbc4cecc75d635aa76df5e8c4f0e5824ccf57cb206b299c1
70e7d04e4d72461436da503b5bfa370c5779e03245c521f30e9779d5ff37dbb2d708b05f2afb27f43ad9defc44df4bd979d72f777e744851fdbf156295e1cc9f s390x-use-elf-gdb_fpregset_t.patch
04911f87904b62dd7662435f9182b20485afb29ddb3d6398a9d31fef13495f7b70639c77fdae3a40e2775e270d7cd40d0cfd7ddf832372b506808d33c8301e01 ppc-musl.patch
b75e1c1ee503a1948a7d5b8d90427b5c7d38ded69978056cee0adca222771a5c95ed1ac73127fcae7b795ea94296344eee5fca47e4cd04b418c164a756fb0933 ppc-ptregs.patch
-660317b7f886ac8d7fcdf44d214e109fdd818ed326afea8bf8046c0a39b36afa29751aefc2acd168207e40254f7340e98c0f34c5e6ad0e2e0a6b0a26cd86641b musl-signals.patch"
+660317b7f886ac8d7fcdf44d214e109fdd818ed326afea8bf8046c0a39b36afa29751aefc2acd168207e40254f7340e98c0f34c5e6ad0e2e0a6b0a26cd86641b musl-signals.patch
+ef132bdb4c0a54c139b1f6ccc72425a3e2320cd74ed037fe164c67fdf8cf5c8c07aa4f504bee8ca30e75f84f03765ac0bba4059334fc752e38d1ee0fa9f51b23 python-3.8.patch"
diff --git a/main/gdb/python-3.8.patch b/main/gdb/python-3.8.patch
new file mode 100644
index 0000000000..db26f5ef40
--- /dev/null
+++ b/main/gdb/python-3.8.patch
@@ -0,0 +1,33 @@
+From b6484282f85bf7f11451b2441599c241d302ad9d Mon Sep 17 00:00:00 2001
+From: Raul Tambre <raul@tambre.ee>
+Date: Sat, 4 May 2019 15:48:17 -0400
+Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in
+ python/lib/gdb/command/prompt.py
+
+The 'is' operator is not meant to be used for comparisons. It currently working
+is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning
+for this.
+
+diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py
+index 3d662a7..04b9e49 100644
+--- a/gdb/python/lib/gdb/command/prompt.py
++++ b/gdb/python/lib/gdb/command/prompt.py
+@@ -45,7 +45,7 @@ The currently defined substitutions are:
+ self.hook_set = False
+
+ def get_show_string (self, pvalue):
+- if self.value is not '':
++ if self.value:
+ return "The extended prompt is: " + self.value
+ else:
+ return "The extended prompt is not set."
+@@ -57,7 +57,7 @@ The currently defined substitutions are:
+ return ""
+
+ def before_prompt_hook(self, current):
+- if self.value is not '':
++ if self.value:
+ return gdb.prompt.substitute_prompt(self.value)
+ else:
+ return None
+