* [gentoo-commits] repo/gentoo:master commit in: app-portage/mirrorselect/files/, app-portage/mirrorselect/
@ 2023-07-06 8:12 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-07-06 8:12 UTC (permalink / raw
To: gentoo-commits
commit: 6a0735a283ec84214d5226749bf590fe45e5cb28
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 6 08:08:45 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 6 08:08:45 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a0735a2
app-portage/mirrorselect: backport --all parsing fix
Bug: https://bugs.gentoo.org/872218
Signed-off-by: Sam James <sam <AT> gentoo.org>
...rselect-2.3.0-main-Fix-all-option-parsing.patch | 48 ++++++++++++++++++++++
.../mirrorselect/mirrorselect-2.3.0-r2.ebuild | 44 ++++++++++++++++++++
2 files changed, 92 insertions(+)
diff --git a/app-portage/mirrorselect/files/mirrorselect-2.3.0-main-Fix-all-option-parsing.patch b/app-portage/mirrorselect/files/mirrorselect-2.3.0-main-Fix-all-option-parsing.patch
new file mode 100644
index 000000000000..0d0462c64752
--- /dev/null
+++ b/app-portage/mirrorselect/files/mirrorselect-2.3.0-main-Fix-all-option-parsing.patch
@@ -0,0 +1,48 @@
+From e0fbc2fb33762211aa5e64175d525e66f4c257d4 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 6 Jul 2023 09:04:42 +0100
+Subject: [PATCH] main: Fix --all option parsing
+
+Avoid --all erroring out with "ERROR: Choose at most one of -s or -a".
+
+Bug: https://bugs.gentoo.org/872218
+Fixes: 7caac017833b01e13028658effc502430c56d770
+Thanks-to: <xpenev@gmail.com>
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/mirrorselect/main.py
++++ b/mirrorselect/main.py
+@@ -145,6 +145,11 @@ class MirrorSelect(object):
+ self.output.white(" interactive:"),
+ " # mirrorselect -i -r",
+ ))
++
++ def set_servers(option, opt_str, value, parser):
++ set_servers.user_configured = True
++ setattr(parser.values, option.dest, value)
++
+ parser = OptionParser(
+ formatter=ColoredFormatter(self.output), description=desc,
+ version='Mirrorselect version: %s' % version)
+@@ -236,8 +241,8 @@ class MirrorSelect(object):
+ "-q", "--quiet", action="store_const", const=0, dest="verbosity",
+ help="Quiet mode")
+ group.add_option(
+- "-s", "--servers", action="store", type="int", default=1,
+- help="Specify Number of servers for Automatic Mode "
++ "-s", "--servers", action="callback", callback=set_servers,
++ type="int", default=1, help="Specify Number of servers for Automatic Mode "
+ "to select. this is only valid for download mirrors. "
+ "If this is not specified, a default of 1 is used.")
+ group.add_option(
+@@ -271,7 +276,7 @@ class MirrorSelect(object):
+ if options.rsync and not (options.interactive or options.all_mirrors):
+ self.output.print_err('rsync servers can only be selected with -i or -a')
+
+- if options.servers and options.all_mirrors:
++ if options.all_mirrors and hasattr(set_servers, 'user_configured'):
+ self.output.print_err('Choose at most one of -s or -a')
+
+ if options.interactive and (
+--
+2.41.0
+
diff --git a/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild b/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild
new file mode 100644
index 000000000000..42d5b60553c5
--- /dev/null
+++ b/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DISTUTILS_USE_SETUPTOOLS=no
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="xml(+)"
+
+inherit edo distutils-r1 prefix
+
+DESCRIPTION="Tool to help select distfiles mirrors for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Mirrorselect"
+SRC_URI="
+ https://dev.gentoo.org/~dolsen/releases/mirrorselect/${P}.tar.gz
+ https://dev.gentoo.org/~dolsen/releases/mirrorselect/mirrorselect-test
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="ipv6"
+
+RDEPEND="
+ dev-util/dialog
+ >=net-analyzer/netselect-0.4[ipv6(+)?]
+ >=dev-python/ssl-fetch-0.3[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-setup.py.patch
+ "${FILESDIR}"/${P}-main-Fix-all-option-parsing.patch
+)
+
+distutils_enable_tests setup.py
+
+python_prepare_all() {
+ python_setup
+
+ eprefixify setup.py mirrorselect/main.py
+ VERSION="${PVR}" edo "${PYTHON}" setup.py set_version
+
+ distutils-r1_python_prepare_all
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-portage/mirrorselect/files/, app-portage/mirrorselect/
@ 2023-09-16 12:44 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-09-16 12:44 UTC (permalink / raw
To: gentoo-commits
commit: 72d3017d3cc5b85191f1de679ae30071ca09a64a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 12:43:41 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 16 12:43:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72d3017d
app-portage/mirrorselect: drop 2.2.6-r2, 2.3.0-r1, 2.3.0-r2
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-portage/mirrorselect/Manifest | 2 -
.../files/mirrorselect-2.3.0-setup.py.patch | 81 ----------------------
.../mirrorselect/mirrorselect-2.2.6-r2.ebuild | 49 -------------
.../mirrorselect/mirrorselect-2.3.0-r1.ebuild | 44 ------------
.../mirrorselect/mirrorselect-2.3.0-r2.ebuild | 51 --------------
5 files changed, 227 deletions(-)
diff --git a/app-portage/mirrorselect/Manifest b/app-portage/mirrorselect/Manifest
index a49c6b7c21ab..e6d2792c9f75 100644
--- a/app-portage/mirrorselect/Manifest
+++ b/app-portage/mirrorselect/Manifest
@@ -1,4 +1,2 @@
-DIST mirrorselect-2.2.6.tar.gz 16727 BLAKE2B 8875bf61e26ac474338d81a602297fa4fdf3fab3dbd478b02129dbe71f2d09445efa9b82792e3e654725c5e87a4ca00d37a3d924f8bd6f2decdf74148d1069c8 SHA512 ff2b88bf568f79182275e2c85cafbeee7cbeb0226225a7c3289f0a1d7a8b5eae9d41c69b099bb7e0cc9b0300b23afea43c3ac1baa13f37c696159bb1b3ac05f8
-DIST mirrorselect-2.3.0.tar.gz 18039 BLAKE2B eebc4a02257b734c3dfd05cee541369689b92548b5421e977dd451442e8c83e426a03845a46e92eaa01507e0cba2b3679c97db2c00f012619cf9f551cfa1e1af SHA512 fc040bf6a9cc79f781157c7b65c6366c86dd54d583b4286845e3d037a2709c376e9132889e9dbe2cd40846cd7bd138aae7111d1a442a421101db756cc259b535
DIST mirrorselect-2.4.0.tar.gz 17315 BLAKE2B 8d1fe0008147d2b15d5edf8ae14cd2782771e848bbd38dff84f6ddbc4120f8727aeb23d0006db6b9ccbfe0918a7aeb1fe6227fa61c2aa82e20da3e773ce9ab4a SHA512 d3fbb7499e4a072b24b21fbd83d503f2c2ba8d2704582b6a529f3167c07453a656f3d22cd3cb5ddba35393cf5cd946788099777ecf37af60bd0648b7e1886ae2
DIST mirrorselect-test 102403 BLAKE2B 8f23cebf111912ea6fcdea5f4a50a84751a4dd0c62956555a5c0b4fbe15d2329424a65b18c3608440bc0fedd4b2d25fc74cfe91e6e434eb90b7090b36e17b65f SHA512 f43d92e9bf7e77c8f04449a786cb659bdfc07257892caca842ab4a63eb9c5351fa48130c2e163857f3233a595cea7b83f5ea9fa879b782e15b73beb62f0e5e27
diff --git a/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch b/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch
deleted file mode 100644
index 6b2e074c0878..000000000000
--- a/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 5444d0ddb5268325aac63dcdeb908b614916dd0f Mon Sep 17 00:00:00 2001
-From: Brian Dolbec <dolsen@gentoo.org>
-Date: Sun, 10 Jul 2022 13:54:45 -0700
-Subject: [PATCH] Revert "setup.py: Migrate from deprecated distutils to setuptools"
-
-This reverts commit 4cd4fb6280433f301ad9159f7473dc32ceb063d6.
-setuptools is installing data_file to the pkg dir inside python.
-Reverting back to distutils for correct install for now.
-
-Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
----
- setup.py | 22 +++++++++++++++++++---
- 1 file changed, 19 insertions(+), 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 9111d5e..a9728fa 100755
---- a/setup.py
-+++ b/setup.py
-@@ -5,10 +5,13 @@
- import logging
- import re
- import sys
-+from distutils import core, log
-+from distutils.command.sdist import sdist
-+from distutils.core import Command
-+
- import os
- import io
- import unittest
--from setuptools import setup, Command
-
-
- __version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
-@@ -34,7 +37,7 @@ manpage = [os.path.join(cwd, path) for path in (
- )]
-
-
--class set_version(Command):
-+class set_version(core.Command):
- """Set python version to our __version__."""
- description = "hardcode scripts' version using VERSION from environment"
- user_options = [] # [(long_name, short_name, desc),]
-@@ -66,6 +69,18 @@ class set_version(Command):
- sub(manpage, man_re)
-
-
-+class x_sdist(sdist):
-+ """sdist defaulting to archive files owned by root."""
-+
-+ def finalize_options(self):
-+ if self.owner is None:
-+ self.owner = 'root'
-+ if self.group is None:
-+ self.group = 'root'
-+
-+ sdist.finalize_options(self)
-+
-+
- class TestCommand(Command):
- user_options = []
-
-@@ -89,7 +104,7 @@ test_data = {
- ]
- }
-
--setup(
-+core.setup(
- name='mirrorselect',
- version=__version__,
- description='Tool for selecting Gentoo source and rsync mirrors.',
-@@ -109,6 +124,7 @@ setup(
- ),
- cmdclass={
- 'test': TestCommand,
-+ 'sdist': x_sdist,
- 'set_version': set_version,
- },
- )
---
-libgit2 1.4.3
-
diff --git a/app-portage/mirrorselect/mirrorselect-2.2.6-r2.ebuild b/app-portage/mirrorselect/mirrorselect-2.2.6-r2.ebuild
deleted file mode 100644
index b3dccbd45918..000000000000
--- a/app-portage/mirrorselect/mirrorselect-2.2.6-r2.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE="xml(+)"
-DISTUTILS_USE_SETUPTOOLS=no
-
-inherit distutils-r1 prefix
-
-DESCRIPTION="Tool to help select distfiles mirrors for Gentoo"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Mirrorselect"
-SRC_URI="https://dev.gentoo.org/~zmedico/dist/${P}.tar.gz
- https://dev.gentoo.org/~dolsen/releases/mirrorselect/mirrorselect-test
-"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="ipv6"
-
-RDEPEND="
- dev-util/dialog
- >=net-analyzer/netselect-0.4[ipv6(+)?]
- >=dev-python/ssl-fetch-0.3[${PYTHON_USEDEP}]
-"
-
-python_prepare_all() {
- python_setup
- eprefixify setup.py mirrorselect/main.py
- echo Now setting version... VERSION="${PVR}" "${PYTHON}" setup.py set_version
- VERSION="${PVR}" "${PYTHON}" setup.py set_version || die "setup.py set_version failed"
- if use ipv6; then
- # The netselect --ipv4 and --ipv6 options are supported only
- # with >=net-analyzer/netselect-0.4[ipv6(+)] (bug 688214).
- sed -e '/^NETSELECT_SUPPORTS_IPV4_IPV6 =/s|False|True|' \
- -i mirrorselect/selectors.py || die
- fi
-
- # Apply e69ec2d046626fa2079d460aab469d04256182cd for bug 698470.
- sed -e 's|key = lex.get_token()|\0\n\t\t\tif key is None:\n\t\t\t\tbreak|' -i mirrorselect/configs.py || die
-
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- esetup.py test || die "tests failed under ${EPYTHON}"
-}
diff --git a/app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild b/app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild
deleted file mode 100644
index 008f33b0c3fe..000000000000
--- a/app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE="xml(+)"
-
-inherit distutils-r1 prefix
-
-DESCRIPTION="Tool to help select distfiles mirrors for Gentoo"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Mirrorselect"
-SRC_URI="https://dev.gentoo.org/~dolsen/releases/mirrorselect/${P}.tar.gz
- https://dev.gentoo.org/~dolsen/releases/mirrorselect/mirrorselect-test
-"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="ipv6"
-
-RDEPEND="
- dev-util/dialog
- >=net-analyzer/netselect-0.4[ipv6(+)?]
- >=dev-python/ssl-fetch-0.3[${PYTHON_USEDEP}]
-"
-
-PATCHES=(
- "${FILESDIR}/mirrorselect-2.3.0-setup.py.patch"
-)
-
-python_prepare_all() {
- python_setup
- eprefixify setup.py mirrorselect/main.py
- echo Now setting version... VERSION="${PVR}" "${PYTHON}" setup.py set_version
- VERSION="${PVR}" "${PYTHON}" setup.py set_version || die "setup.py set_version failed"
-
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- esetup.py test || die "tests failed under ${EPYTHON}"
-}
diff --git a/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild b/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild
deleted file mode 100644
index 07409a536232..000000000000
--- a/app-portage/mirrorselect/mirrorselect-2.3.0-r2.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE="xml(+)"
-
-inherit edo distutils-r1 prefix
-
-DESCRIPTION="Tool to help select distfiles mirrors for Gentoo"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Mirrorselect"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mirrorselect.git"
- inherit git-r3
-
- SSL_FETCH_VER=9999
-else
- SRC_URI="
- https://dev.gentoo.org/~dolsen/releases/mirrorselect/${P}.tar.gz
- https://dev.gentoo.org/~dolsen/releases/mirrorselect/mirrorselect-test
- "
-
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
- SSL_FETCH_VER=0.3
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="ipv6"
-
-RDEPEND="
- dev-util/dialog
- >=net-analyzer/netselect-0.4[ipv6(+)?]
- >=dev-python/ssl-fetch-${SSL_FETCH_VER}[${PYTHON_USEDEP}]
-"
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
- python_setup
-
- local -x VERSION="${PVR}"
- eprefixify setup.py mirrorselect/main.py
- edo "${PYTHON}" setup.py set_version
-
- distutils-r1_python_prepare_all
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-16 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-16 12:44 [gentoo-commits] repo/gentoo:master commit in: app-portage/mirrorselect/files/, app-portage/mirrorselect/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-07-06 8:12 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox