delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/09/20:28:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <fdb072ec0503091728e195fad@mail.gmail.com>
Date: Wed, 9 Mar 2005 20:28:38 -0500
From: Robert Pendell <shinji257 AT gmail DOT com>
Reply-To: Robert Pendell <shinji257 AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: no-mirror patch for setup.exe
In-Reply-To: <422F439D.4000203@design.mxim.com>
Mime-Version: 1.0
References: <422F439D DOT 4000203 AT design DOT mxim DOT com>
X-IsSubscribed: yes
Note-from-DJ: This may be spam

Actually this is a good idea as it provides a fail-safe way for
someone to update or install via Cygwin should the main website fail
again.  That is of course in the unlikely event that it should happen.
 This of course would depend on the person knowing a valid mirror to
use but still...


On Wed, 09 Mar 2005 18:42:37 +0000, Jason Pearce <jasonp AT design DOT mxim DOT com> wrote:
> I want to use setup.exe behind a firewall where it cant see the list of
> mirrors.
> This patch creates a -m option for no-mirror. In this case the
> application will not try to get a list of sites and the user is obliged
> to provide a valid site with the existing -s switch.
> 
> BTW - The -h help option doesn't seem to work.
> 
> Regards,
> Jason
> 
> Index: site.cc
> ===================================================================
> RCS file: /cvs/cygwin-apps/setup/site.cc,v
> retrieving revision 2.35
> diff -u -p -r2.35 site.cc
> --- site.cc     29 Dec 2004 12:38:04 -0000      2.35
> +++ site.cc     9 Mar 2005 18:39:22 -0000
> @@ -62,6 +62,7 @@ SitePage::SitePage ()
> }
> 
> #include "getopt++/StringOption.h"
> +#include "getopt++/BoolOption.h"
> #include "UserSettings.h"
> 
> using namespace std;
> @@ -70,6 +71,7 @@ SiteList site_list;
> SiteList all_site_list;
> 
> StringOption SiteOption("", 's', "site", "Download site", false);
> +static BoolOption NoMirrorOption (false, 'm', "no-mirror", "Don't
> download mirror sites");
> 
> /* XXX make into a singleton? */
> static SiteSetting ChosenSites;
> @@ -194,6 +196,14 @@ static int
> get_site_list (HINSTANCE h, HWND owner)
> {
>   char mirror_url[1000];
> +  bool NoMirror = NoMirrorOption;
> +
> +  if (NoMirror){
> +    /* Don't bother with getting a list of sites, the user must specify
> +       a site via the -s switch. But this prevents failure if behind
> firewall
> +       and can't access the mirror list */
> +    return 0;
> +  }
> 
>   if (LoadString (h, IDS_MIRROR_LST, mirror_url, sizeof (mirror_url)) <= 0)
>     return 1;
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 


-- 
Robert Pendell
shinji257 AT gmail DOT com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019