From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8CB571381F3 for ; Wed, 16 Oct 2013 09:17:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E764E09C9; Wed, 16 Oct 2013 09:17:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 031DFE09C9 for ; Wed, 16 Oct 2013 09:17:45 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E4B4033EFC5 for ; Wed, 16 Oct 2013 09:17:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 83CE7E5308 for ; Wed, 16 Oct 2013 09:17: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: <1381915013.3b46a1e2cc4179b47ce95b790431e22d81f209b3.dol-sen@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: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 3b46a1e2cc4179b47ce95b790431e22d81f209b3 X-VCS-Branch: master Date: Wed, 16 Oct 2013 09:17: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-Archives-Salt: b6df0eac-feda-4078-a0d6-8a45e78980da X-Archives-Hash: 461575056b74b22ebddd3e1e10f541fc commit: 3b46a1e2cc4179b47ce95b790431e22d81f209b3 Author: Brian Dolbec gentoo org> AuthorDate: Wed Oct 16 09:16:53 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Wed Oct 16 09:16:53 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=3b46a1e2 Make the -r -a options select only the rotation server rather than force -o for screen output only. --- mirrorselect/main.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mirrorselect/main.py b/mirrorselect/main.py index 5f7dc64..61fd5c2 100755 --- a/mirrorselect/main.py +++ b/mirrorselect/main.py @@ -244,7 +244,9 @@ class MirrorSelect(object): group.add_option( "-a", "--all_mirrors", action="store_true", default=False, help="This will present a list of all filtered search results " - "to make it possible to select mirrors you wish to use.") + "to make it possible to select mirrors you wish to use. " + " For the -r, --rsync option, it will select the rotation server " + "only. As multiple rsync URL's are not supported.") group.add_option( "-i", "--interactive", action="store_true", default=False, help="Interactive Mode, this will present a list " @@ -335,12 +337,6 @@ 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') - elif options.rsync and options.all_mirrors and not options.output: - # force output to screen. - # multiple uri's break normal sync operation - options.output = True - self.output.print_info("Forcing output to screen, as " - "multiple rsync uris are not supported\n") if options.interactive and ( options.deep or @@ -429,7 +425,9 @@ class MirrorSelect(object): hosts = self.get_available_hosts(options) if options.all_mirrors: - urls = [url for url, args in list(hosts)] + urls = sorted([url for url, args in list(hosts)]) + if options.rsync: + urls = [urls[0]] else: urls = self.select_urls(hosts, options)