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/

