[Frugalware-darcs] setup: configsource: allow language-specific default mirrors

VMiklos vmiklos at frugalware.org
Sun Jun 10 02:27:09 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=setup;a=darcs_commitdiff;h=20070610001141-e2957-970167a5f212466b86efdbfbec1c0e4df0f6769c.gz;

[configsource: allow language-specific default mirrors
VMiklos <vmiklos at frugalware.org>**20070610001141] {
hunk ./src/plugins/configsource.c 85
-	char line[PATH_MAX], *ptr, *country;
+	char line[PATH_MAX], *ptr, *country, *preferred;
hunk ./src/plugins/configsource.c 93
+	/* this string should be the best mirror for the given language from
+	 * /etc/pacman.d */
+	preferred = strdup(_("ftp://ftp5."));
hunk ./src/plugins/configsource.c 111
-			mirrors = g_list_append(mirrors, strdup("Off")); //unchecked by default in checkbox
+			if(!strncmp(ptr, preferred, strlen(preferred)))
+				mirrors = g_list_append(mirrors, strdup("On"));
+			else
+				mirrors = g_list_append(mirrors, strdup("Off")); //unchecked by default in checkbox
hunk ./src/plugins/configsource.c 117
+	free(preferred);
hunk ./src/plugins/configsource.c 170
-		if (!strcmp(g_list_nth_data(mirrorlist, i), "Off")) {
+		if (!strcmp(g_list_nth_data(mirrorlist, i), "Off") ||
+				!strcmp(g_list_nth_data(mirrorlist, i), "On"))
+		{
}


More information about the Frugalware-darcs mailing list