mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-10 04:25:16 +08:00
parent
f57655c091
commit
9dcd539495
@ -58,7 +58,7 @@
|
||||
4. `source`: 该 `target` 所能换的具体的源,由 `mirror` 提供服务,往往一个 `mirror` 会提供许多 `source`
|
||||
5. `recipe`: 是为一个 `target` 定义的具体换源方法,请参考 `src` 目录中的 `recipe` 目录
|
||||
|
||||
6. `feature`: 一个 `target` 可以支持的功能,比如能否重置回默认上游源等
|
||||
6. `feature`: 一个 `target` 可以支持的功能,比如能否重置回上游默认源等
|
||||
|
||||
7. **镜像源**: 为了方便,**偶尔**我们将直接称`mirror`和/或`source`为**镜像源**,这只是一种方便性的称呼,可以统称二者,也可以根据上下文指代二者之一
|
||||
|
||||
|
@ -599,7 +599,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
speed = -1024*1024*1024;
|
||||
if (!src.url)
|
||||
{
|
||||
smi.skip_reason_CN = "默认上游源URL未知,请帮助补充";
|
||||
smi.skip_reason_CN = "上游默认源URL未知,请帮助补充";
|
||||
smi.skip_reason_EN = "The default upstream source URL is unknown, please help to add";
|
||||
}
|
||||
}
|
||||
@ -628,10 +628,16 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
else
|
||||
{
|
||||
const char *msg = CliOpt_InEnglish ? provider->abbr : provider->name;
|
||||
|
||||
if (xy_streql ("upstream", provider->code))
|
||||
measure_msgs[i] = xy_strjoin (3, " ^ ", msg, " ... ");
|
||||
{
|
||||
measure_msgs[i] = xy_strjoin (5, " ^ ", msg, " (", src.url, ") ... ");
|
||||
}
|
||||
else
|
||||
measure_msgs[i] = xy_strjoin (3, " - ", msg, " ... ");
|
||||
{
|
||||
measure_msgs[i] = xy_strjoin (3, " - ", msg, " ... ");
|
||||
}
|
||||
|
||||
|
||||
printf ("%s", measure_msgs[i]);
|
||||
fflush (stdout);
|
||||
@ -833,7 +839,7 @@ source_has_empty_url (Source_t *source)
|
||||
void
|
||||
confirm_source (Source_t *source)
|
||||
{
|
||||
// 由于实现问题,我们把本应该独立出去的默认上游源,也放在了可以换源的数组中,而且放在第一个
|
||||
// 由于实现问题,我们把本应该独立出去的上游默认源,也放在了可以换源的数组中,而且放在第一个
|
||||
// chsrc 已经规避用户使用未实现的 `chsrc reset`
|
||||
// 但是某些用户可能摸索着强行使用 chsrc set target upstream,从而执行起该禁用的功能,
|
||||
// 之所以禁用,是因为有的 reset 我们并没有实现,我们在这里阻止这些邪恶的用户
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contributors : Shengwei Chen <414685209@qq.com>
|
||||
* |
|
||||
* Created On : <2023-08-29>
|
||||
* Last Modified : <2024-11-21>
|
||||
* Last Modified : <2024-12-18>
|
||||
*
|
||||
* chsrc struct
|
||||
* ------------------------------------------------------------*/
|
||||
@ -40,8 +40,10 @@ typedef SourceProvider_t MirrorSite_t;
|
||||
|
||||
SourceProvider_t UpstreamProvider =
|
||||
{
|
||||
/* 引入新的上游默认源时,请使下面第一行的前三个字段保持不变,只添加第四个字段 */
|
||||
"upstream", "Upstream", "上游默认源", NULL,
|
||||
{SKIP, "上游默认源不测速", "SKIP for upstream source", NULL}
|
||||
/* 引入新的上游默认源时,请完全修改下面这个结构体 */
|
||||
{SKIP, "URL未知,邀您参与贡献!", "URL unknown, welcome to contribute!", NULL}
|
||||
},
|
||||
|
||||
UserDefinedProvider =
|
||||
|
@ -10,9 +10,9 @@
|
||||
* Last Modified : <2024-12-18>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static SourceProvider_t os_Upstream_openEuler =
|
||||
static SourceProvider_t os_openEuler_upstream =
|
||||
{
|
||||
"upstream", "https://repo.openeuler.org/", "上游默认源 https://repo.openeuler.org/", "https://repo.openeuler.org/",
|
||||
"upstream", "Upstream", "上游默认源", "https://repo.openeuler.org/",
|
||||
{NotSkip, NA, NA, "https://repo.openeuler.org/openEuler-24.03-LTS/ISO/x86_64/openEuler-24.03-LTS-netinst-x86_64-dvd.iso"} // 896MB
|
||||
};
|
||||
|
||||
@ -22,7 +22,7 @@ static SourceProvider_t os_Upstream_openEuler =
|
||||
*/
|
||||
static Source_t os_openeuler_sources[] =
|
||||
{
|
||||
{&os_Upstream_openEuler, "https://repo.openeuler.org/"},
|
||||
{&os_openEuler_upstream, "https://repo.openeuler.org/"},
|
||||
{&Ali, "https://mirrors.aliyun.com/openeuler/"},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user