From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QdSJF-0003qC-8x for garchives@archives.gentoo.org; Sun, 03 Jul 2011 19:26:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6872721C038; Sun, 3 Jul 2011 19:25:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0EE5921C034 for ; Sun, 3 Jul 2011 19:25:05 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 369551B403B for ; Sun, 3 Jul 2011 19:18:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 90A498003D for ; Sun, 3 Jul 2011 19:18:54 +0000 (UTC) From: "Wiktor W Brodlo" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Wiktor W Brodlo" Message-ID: Subject: [gentoo-commits] proj/anaconda:master commit in: /, iw/ X-VCS-Repository: proj/anaconda X-VCS-Files: dispatch.py gui.py installclass.py iw/mirrorselect-sync_gui.py X-VCS-Directories: / iw/ X-VCS-Committer: wiktor X-VCS-Committer-Name: Wiktor W Brodlo X-VCS-Revision: d098ced2c10103fac6e71bb7a2704326d785a51e Date: Sun, 3 Jul 2011 19:18:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3ebe23fd4d7b52ea0f7e5b7166dd53af commit: d098ced2c10103fac6e71bb7a2704326d785a51e Author: wiktor w brodlo brodlo net> AuthorDate: Sun Jul 3 19:18:40 2011 +0000 Commit: Wiktor W Brodlo brodlo net> CommitDate: Sun Jul 3 19:18:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/anaconda.git;= a=3Dcommit;h=3Dd098ced2 mirrorselect-sync --- dispatch.py | 2 +- gui.py | 2 +- installclass.py | 1 + iw/mirrorselect-sync_gui.py | 70 +++++++++++++++++++++++++++++++++++++= ++++++ 4 files changed, 73 insertions(+), 2 deletions(-) diff --git a/dispatch.py b/dispatch.py index 073dc2c..4ade775 100644 --- a/dispatch.py +++ b/dispatch.py @@ -97,7 +97,7 @@ installSteps =3D [ =20 # Installing the Gentoo Base System ("mirrorselect", ), - #("mirrorselect-sync", ), + ("mirrorselect-sync", ), # profile # use =20 diff --git a/gui.py b/gui.py index addce82..41f127c 100755 --- a/gui.py +++ b/gui.py @@ -81,7 +81,7 @@ stepToClass =3D { =20 # Installing the Gentoo Base System "mirrorselect": ("mirrorselect_gui", "MirrorselectWindow"), - #("mirrorselect-sync", ), + "mirrorselect-sync": ("mirrorselect-sync_gui", "MirrorselectSyncWind= ow"), =20 # Configuring the Kernel "timezone" : ("timezone_gui", "TimezoneWindow"), diff --git a/installclass.py b/installclass.py index 561ccdf..28104d8 100644 --- a/installclass.py +++ b/installclass.py @@ -104,6 +104,7 @@ class BaseInstallClass(object): =20 # Installing the Gentoo Base System "mirrorselect", + "mirrorselect-sync", =20 # Configuring the Kernel "timezone", diff --git a/iw/mirrorselect-sync_gui.py b/iw/mirrorselect-sync_gui.py new file mode 100644 index 0000000..17d84ec --- /dev/null +++ b/iw/mirrorselect-sync_gui.py @@ -0,0 +1,70 @@ +# +# mirrorselect-sync_gui.py: gui mirrorselect. +# +# Copyright (C) 2011 wiktor w brodlo +# Copyright (C) 2011 Gentoo Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import string +import gtk +import gtk.glade +import gtk.gdk +import gobject +import pango +import sys +import gui +import os +from mirrorselect_gui import MirrorselectWindow + +from iw_gui import * + +from constants import * +import gettext +_ =3D lambda x: gettext.ldgettext("anaconda", x) + +class MirrorselectSyncWindow(InstallWindow): + def getNext(self): + return None + + def getScreen(self, anaconda): + self.anaconda =3D anaconda + self.intf =3D anaconda.intf =20 + ms =3D MirrorselectWindow() + =09 + (self.xml, self.align) =3D gui.getGladeWidget("mirrorselect.glade", "m= irrorselect_align") + =09 + mirrorsf =3D None + =09 + while mirrorsf =3D=3D None: + # Try downloading the mirrorlist + mirrorsf =3D ms.downloadMirrorlist() + # if failed,=20 + if mirrorsf =3D=3D None: + md =3D gtk.MessageDialog(buttons=3Dgtk.BUTTONS_YES_NO) + md.set_property("title", _("Failed to download mirrorlist")) + md.set_property("text", _("Failed to download the mirror list. Would= you like to try again?\nPressing 'No' will abort the installation.")) + if md.run() =3D=3D gtk.RESPONSE_NO: + md.destroy() + InstallControlWindow._doExit([]) + =09 + mirrors_parsed =3D ms.parseMirrors(mirrorsf) + self.mirrors =3D ms.mirrorList(mirrors_parsed, "rsync") +=09 + self.table =3D self.xml.get_widget("mirrors_table") + =09 + ms.addMirrors(self.table, self.mirrors, mirrors_parsed) +=09 + return self.align