This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: no-mirror patch for setup.exe


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@design.mxim.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@gmail.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]