From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B1909158091 for ; Mon, 30 May 2022 23:12:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 031A0E0A59; Mon, 30 May 2022 23:12:24 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8868E0A59 for ; Mon, 30 May 2022 23:12:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2376634174D for ; Mon, 30 May 2022 23:12:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 52E644D5 for ; Mon, 30 May 2022 23:12:21 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1653952293.eb9a6203b721d7247f79cb8c991ef835f1b9e1f7.dolsen@gentoo> Subject: [gentoo-commits] proj/mirrorselect:master commit in: /, mirrorselect/ X-VCS-Repository: proj/mirrorselect X-VCS-Files: mirrorselect.8 mirrorselect/extractor.py mirrorselect/main.py X-VCS-Directories: mirrorselect/ / X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: eb9a6203b721d7247f79cb8c991ef835f1b9e1f7 X-VCS-Branch: master Date: Mon, 30 May 2022 23:12:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f9a3d164-6c45-4b94-a4be-8829574c1322 X-Archives-Hash: e91fc0836df24875cce88337639b482e commit: eb9a6203b721d7247f79cb8c991ef835f1b9e1f7 Author: Brian Dolbec gentoo org> AuthorDate: Mon May 30 23:01:21 2022 +0000 Commit: Brian Dolbec gentoo 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 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')