public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/
Date: Mon, 30 May 2022 23:12:21 +0000 (UTC)	[thread overview]
Message-ID: <1653952293.eb9a6203b721d7247f79cb8c991ef835f1b9e1f7.dolsen@gentoo> (raw)

commit:     eb9a6203b721d7247f79cb8c991ef835f1b9e1f7
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 23:01:21 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon May 30 23:11:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=eb9a6203

Apply bug 730994 https filtering patch

Author: Peter Levine
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 mirrorselect.8            | 3 +++
 mirrorselect/extractor.py | 2 +-
 mirrorselect/main.py      | 7 +++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/mirrorselect.8 b/mirrorselect.8
index 8f0f56e..49caadd 100644
--- a/mirrorselect.8
+++ b/mirrorselect.8
@@ -44,6 +44,9 @@ ftp only mode. Will not consider hosts of other types.
 .B \-H, \-\-http
 http only mode. Will not consider hosts of other types.
 .TP
+.B \-S, \-\-https
+https only mode. Will not consider hosts of other types.
+.TP
 .B \-r, \-\-rsync
 rsync mode. Allows you to interactively select your rsync mirror.
  Requires -i to be used.

diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py
index dca8302..19dc059 100644
--- a/mirrorselect/extractor.py
+++ b/mirrorselect/extractor.py
@@ -50,7 +50,7 @@ class Extractor(object):
 				filters[opt] = value
 				self.output.print_info('Limiting test to "%s=%s" hosts. \n'
 					%(opt, value))
-		for opt in ["ftp", "http"]:
+		for opt in ["ftp", "http", "https"]:
 			if getattr(options, opt):
 				filters["proto"] = opt
 				self.output.print_info('Limiting test to %s hosts. \n' % opt )

diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index c3b5633..b0a68cc 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -181,6 +181,9 @@ class MirrorSelect(object):
 		group.add_option(
 			"-H", "--http", action="store_true", default=False,
 			help="http only mode. Will not consider hosts of other types")
+		group.add_option(
+			"-S", "--https", action="store_true", default=False,
+			help="https only mode. Will not consider hosts of other types")
 		group.add_option(
 			"-r", "--rsync", action="store_true", default=False,
 			help="rsync mode. Allows you to interactively select your"
@@ -255,8 +258,8 @@ class MirrorSelect(object):
 		# sanity checks
 
 		# hack: check if more than one of these is set
-		if options.http + options.ftp + options.rsync > 1:
-			self.output.print_err('Choose at most one of -H, -f and -r')
+		if options.http + options.https + options.ftp + options.rsync > 1:
+			self.output.print_err('Choose at most one of -H, -S, -f and -r')
 
 		if options.ipv4 and options.ipv6:
 			self.output.print_err('Choose at most one of --ipv4 and --ipv6')


             reply	other threads:[~2022-05-30 23:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 23:12 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-07-17  5:09 [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/ Zac Medico
2019-05-27 18:08 Zac Medico
2018-05-26 15:43 Brian Dolbec
2014-01-31 15:44 [gentoo-commits] proj/mirrorselect:ssl " Brian Dolbec
2014-03-02  7:44 ` [gentoo-commits] proj/mirrorselect:master " Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1653952293.eb9a6203b721d7247f79cb8c991ef835f1b9e1f7.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox