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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B7E351382C5 for ; Wed, 3 Jun 2020 19:05:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE041E096C; Wed, 3 Jun 2020 19:05:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB49CE096C for ; Wed, 3 Jun 2020 19:05:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1CDD834EED7 for ; Wed, 3 Jun 2020 19:05:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A5179C for ; Wed, 3 Jun 2020 19:05:43 +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: <1591210684.7caac017833b01e13028658effc502430c56d770.dolsen@gentoo> Subject: [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/ X-VCS-Repository: proj/mirrorselect X-VCS-Files: mirrorselect/main.py X-VCS-Directories: mirrorselect/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 7caac017833b01e13028658effc502430c56d770 X-VCS-Branch: master Date: Wed, 3 Jun 2020 19:05:43 +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: 2eb72c76-97be-4246-8ead-3fb78af7aea7 X-Archives-Hash: a582e2484ce09b5be24fd9aac3387ad7 commit: 7caac017833b01e13028658effc502430c56d770 Author: Brian Dolbec gentoo org> AuthorDate: Wed Jun 3 18:53:47 2020 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed Jun 3 18:58:04 2020 +0000 URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=7caac017 main.py: Add a -a, -s combo sanity check This is to prevent all mirrors from being added to make.conf when the -s option is also enabled. The -a option takes priority in the code, so there is never any selection done. This options check will error out when both options are enabled. Reported by: toralf on #gentoo-dev Signed-off-by: Brian Dolbec gentoo.org> mirrorselect/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirrorselect/main.py b/mirrorselect/main.py index b49461b..c4f649f 100755 --- a/mirrorselect/main.py +++ b/mirrorselect/main.py @@ -271,6 +271,9 @@ 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: + self.output.print_err('Choose at most one of -s or -a') + if options.interactive and ( options.deep or options.blocksize or