From e14213a0eff6711e61225a95807e51ec329196cc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 16 Aug 2020 13:48:31 -0700 Subject: 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 --- app-portage/esearch/esearch-1.3-r2.ebuild | 52 --------------------- app-portage/esearch/esearch-1.3-r3.ebuild | 53 ++++++++++++++++++++++ .../esearch/files/1.3-updatedb-quoting.patch | 39 ++++++++++++++++ 3 files changed, 92 insertions(+), 52 deletions(-) delete mode 100644 app-portage/esearch/esearch-1.3-r2.ebuild create mode 100644 app-portage/esearch/esearch-1.3-r3.ebuild create mode 100644 app-portage/esearch/files/1.3-updatedb-quoting.patch (limited to 'app-portage') diff --git a/app-portage/esearch/esearch-1.3-r2.ebuild b/app-portage/esearch/esearch-1.3-r2.ebuild deleted file mode 100644 index 39ad2fc4e7f2..000000000000 --- a/app-portage/esearch/esearch-1.3-r2.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -PYTHON_COMPAT=(python{3_6,3_7}) -PYTHON_REQ_USE="readline(+)" - -inherit distutils-r1 - -DESCRIPTION="Replacement for 'emerge --search' with search-index" -HOMEPAGE="https://github.com/fuzzyray/esearch" -SRC_URI="https://github.com/downloads/fuzzyray/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -IUSE="l10n_fr l10n_it" - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" - -DEPEND="sys-apps/portage" -RDEPEND="${DEPEND}" - -# Populate the patches array for any patches for -rX releases -# It is an array of patch file names of the form: -# "${FILESDIR}"/${PV}-fix-EPREFIX-capability.patch -PATCHES=( - "${FILESDIR}"/${PV}-Fix-setup.py.patch - "${FILESDIR}"/${PV}-Fix-python-3-compatability.patch -) - -python_configure_all() { - echo VERSION="${PVR}" "${EPYTHON}" setup.py set_version - VERSION="${PVR}" "${EPYTHON}" setup.py set_version \ - || die "setup.py set_version failed" -} - -python_install_all() { - distutils-r1_python_install_all - dodoc eupdatedb.cron - - # Remove unused man pages according to the l10n flags - if ! use l10n_fr ; then - rm -rf "${ED}"/usr/share/man/fr \ - || die "rm failed to remove ${ED}/usr/share/man/fr" - fi - - if ! use l10n_it ; then - rm -rf "${ED}"/usr/share/man/it \ - || die "rm failed to remove ${ED}/usr/share/man/it" - fi -} diff --git a/app-portage/esearch/esearch-1.3-r3.ebuild b/app-portage/esearch/esearch-1.3-r3.ebuild new file mode 100644 index 000000000000..026f4017bec1 --- /dev/null +++ b/app-portage/esearch/esearch-1.3-r3.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=(python3_{6..9}) +PYTHON_REQ_USE="readline(+)" + +inherit distutils-r1 + +DESCRIPTION="Replacement for 'emerge --search' with search-index" +HOMEPAGE="https://github.com/fuzzyray/esearch" +SRC_URI="https://github.com/downloads/fuzzyray/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="l10n_fr l10n_it" + +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" + +DEPEND="sys-apps/portage" +RDEPEND="${DEPEND}" + +# Populate the patches array for any patches for -rX releases +# It is an array of patch file names of the form: +# "${FILESDIR}"/${PV}-fix-EPREFIX-capability.patch +PATCHES=( + "${FILESDIR}"/${PV}-Fix-setup.py.patch + "${FILESDIR}"/${PV}-Fix-python-3-compatability.patch + "${FILESDIR}"/${PV}-updatedb-quoting.patch +) + +python_configure_all() { + echo VERSION="${PVR}" "${EPYTHON}" setup.py set_version + VERSION="${PVR}" "${EPYTHON}" setup.py set_version \ + || die "setup.py set_version failed" +} + +python_install_all() { + distutils-r1_python_install_all + dodoc eupdatedb.cron + + # Remove unused man pages according to the l10n flags + if ! use l10n_fr ; then + rm -rf "${ED}"/usr/share/man/fr \ + || die "rm failed to remove ${ED}/usr/share/man/fr" + fi + + if ! use l10n_it ; then + rm -rf "${ED}"/usr/share/man/it \ + || die "rm failed to remove ${ED}/usr/share/man/it" + fi +} 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 000000000000..4f20634e6750 --- /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 +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 +--- + 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 + -- cgit v1.2.3-65-gdbad