commit:     e14213a0eff6711e61225a95807e51ec329196cc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 16 20:48:31 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Aug 16 20:54:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e14213a0

app-portage/esearch: 1.3-r3 for bug 670224

 #670224 fix esearchdb.py quoting

Closes: https://bugs.gentoo.org/670224
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 ...esearch-1.3-r2.ebuild => esearch-1.3-r3.ebuild} |  5 +--
 .../esearch/files/1.3-updatedb-quoting.patch       | 39 ++++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/app-portage/esearch/esearch-1.3-r2.ebuild 
b/app-portage/esearch/esearch-1.3-r3.ebuild
similarity index 94%
rename from app-portage/esearch/esearch-1.3-r2.ebuild
rename to app-portage/esearch/esearch-1.3-r3.ebuild
index 39ad2fc4e7f..026f4017bec 100644
--- a/app-portage/esearch/esearch-1.3-r2.ebuild
+++ b/app-portage/esearch/esearch-1.3-r3.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-PYTHON_COMPAT=(python{3_6,3_7})
+PYTHON_COMPAT=(python3_{6..9})
 PYTHON_REQ_USE="readline(+)"
 
 inherit distutils-r1
@@ -27,6 +27,7 @@ RDEPEND="${DEPEND}"
 PATCHES=(
        "${FILESDIR}"/${PV}-Fix-setup.py.patch
        "${FILESDIR}"/${PV}-Fix-python-3-compatability.patch
+       "${FILESDIR}"/${PV}-updatedb-quoting.patch
 )
 
 python_configure_all() {

diff --git a/app-portage/esearch/files/1.3-updatedb-quoting.patch 
b/app-portage/esearch/files/1.3-updatedb-quoting.patch
new file mode 100644
index 00000000000..4f20634e675
--- /dev/null
+++ b/app-portage/esearch/files/1.3-updatedb-quoting.patch
@@ -0,0 +1,39 @@
+From 8cbf59309a48327b74969bf402b415e389d79f73 Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmed...@gentoo.org>
+Date: Sun, 16 Aug 2020 13:37:27 -0700
+Subject: [PATCH] updatedb: use repr for correct quoting (bug 670224)
+
+Bug: https://bugs.gentoo.org/670224
+Signed-off-by: Zac Medico <zmed...@gentoo.org>
+---
+ esearch/update.py | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/esearch/update.py b/esearch/update.py
+index f05d08f..b18070c 100755
+--- a/esearch/update.py
++++ b/esearch/update.py
+@@ -210,18 +210,10 @@ def updatedb(config=None):
+                 lastcat = curcat
+ 
+             installed = pkg_version(VARTREE.dep_bestmatch(pkg))
+-            if installed:
+-                installed = "\'%s\'" % installed
+-            else:
+-                installed = str(installed)
+ 
+             dbfile.write(
+-                _unicode(
+-                    "(\'%s\', \'%s\', %s" %(pkgname, pkg, str(masked)) +
+-                    ", \'%s\', %s" % (pkg_version(pkgv), installed) +
+-                    ", \'%s\', \'%s\', \'%s\', \'%s\'"
+-                    % (filesize, homepage, description.replace("'", "\\'"),
+-                        _license) + "),\n"))
++                repr((pkgname, pkg, masked, pkg_version(pkgv), installed,
++                    filesize, homepage, description, _license)) + ",\n")
+ 
+     except KeyboardInterrupt:
+         dbfile.close()
+-- 
+2.25.3
+

Reply via email to