Add set by postfix

This commit is contained in:
Aoran Zeng
2025-08-10 15:43:46 +08:00
parent 341369f347
commit caa90fee32
9 changed files with 97 additions and 156 deletions

View File

@@ -2,8 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
#define PL_Dart_Pub_Speed_URL_Postfix "/packages/flutter_vision/versions/1.1.4.tar.gz"
def_target(pl_dart);
void
@@ -26,24 +24,19 @@ pl_dart_prelude (void)
chef_allow_set();
chef_allow_reset();
chef_allow_local_mode (this, FullyCan, "Pub 支持项目级换源", "Pub supports project-level source changing");
chef_allow_local_mode (this, FullyCan, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);
def_sources_begin()
{&upstream, "https://pub.dev", "https://pub.dev" PL_Dart_Pub_Speed_URL_Postfix},
{&FlutterCN, "https://pub.flutter-io.cn",
"https://pub.flutter-io.cn" PL_Dart_Pub_Speed_URL_Postfix},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub",
"https://mirror.sjtu.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub",
"https://mirrors.tuna.tsinghua.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix},
{&Nju, "https://mirror.nju.edu.cn/dart-pub",
"https://mirror.nju.edu.cn/dart-pub" PL_Dart_Pub_Speed_URL_Postfix}
{&upstream, "https://pub.dev", FeedByPrelude},
{&FlutterCN, "https://pub.flutter-io.cn", FeedByPrelude},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub", FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub", FeedByPrelude,
{&Nju, "https://mirror.nju.edu.cn/dart-pub", FeedByPrelude}
def_sources_end()
chsrc_set_sources_speed_measure_url_with_postfix (this, "/packages/flutter_vision/versions/1.1.4.tar.gz");
}

View File

@@ -2,8 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
#define OS_Debian_Speed_URL_Postfix "/dists/bookworm/main/Contents-all.gz"
def_target(os_debian);
void
@@ -35,45 +33,25 @@ os_debian_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "http://deb.debian.org/debian", DelegateToUpstream},
{&upstream, "http://deb.debian.org/debian", FeedByPrelude},
{&MirrorZ, "https://mirrors.cernet.edu.cn/debian/", FeedByPrelude},
{&Ali, "https://mirrors.aliyun.com/debian", FeedByPrelude},
{&Volcengine, "https://mirrors.volces.com/debian", FeedByPrelude},
{&Bfsu, "https://mirrors.bfsu.edu.cn/debian", FeedByPrelude},
{&Ustc, "https://mirrors.ustc.edu.cn/debian", FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/debian", FeedByPrelude},
{&Tencent, "https://mirrors.tencent.com/debian", FeedByPrelude}
/* MirrorZ 的速度这么测也是可以的 */
{&MirrorZ, "https://mirrors.cernet.edu.cn/debian/",
"https://mirrors.cernet.edu.cn/debian/" OS_Debian_Speed_URL_Postfix},
{&Ali, "https://mirrors.aliyun.com/debian",
"https://mirrors.aliyun.com/debian" OS_Debian_Speed_URL_Postfix},
{&Volcengine, "https://mirrors.volces.com/debian",
"https://mirrors.volces.com/debian" OS_Debian_Speed_URL_Postfix},
{&Bfsu, "https://mirrors.bfsu.edu.cn/debian",
"https://mirrors.bfsu.edu.cn/debian" OS_Debian_Speed_URL_Postfix},
{&Ustc, "https://mirrors.ustc.edu.cn/debian",
"https://mirrors.ustc.edu.cn/debian" OS_Debian_Speed_URL_Postfix},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/debian",
"https://mirrors.tuna.tsinghua.edu.cn/debian" OS_Debian_Speed_URL_Postfix},
{&Tencent, "https://mirrors.tencent.com/debian",
"https://mirrors.tencent.com/debian" OS_Debian_Speed_URL_Postfix}
// {&Tencent_Intra, "https://mirrors.tencentyun.com/debian", FeedBySourcesPrepare},
// {&Tencent_Intra, "https://mirrors.tencentyun.com/debian", FeedByPrelude},
/* 不启用原因:过慢 */
// {&Netease, "https://mirrors.163.com/debian", FeedBySourcesPrepare},
// {&Netease, "https://mirrors.163.com/debian", FeedByPrelude},
/* 不启用原因:过慢 */
// {&Sohu, "https://mirrors.sohu.com/debian", FeedBySourcesPrepare}
// {&Sohu, "https://mirrors.sohu.com/debian", FeedByPrelude}
def_sources_end()
}
void
os_debian_sources_prepare ()
{
chsrc_sources_prepare_speedurl_with_postfix (os_debian, OS_Debian_Speed_URL_Postfix);
chsrc_set_sources_speed_measure_url_with_postfix (this, "/dists/bookworm/main/Contents-all.gz");
}

View File

@@ -2,8 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
#define OS_Ubuntu_Speed_URL_Postfix "/dists/noble/Contents-amd64.gz"
def_target(os_ubuntu);
void
@@ -34,47 +32,25 @@ os_ubuntu_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "http://archive.ubuntu.com/ubuntu/", /* 不支持https */
DelegateToUpstream},
{&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/",
"https://mirrors.cernet.edu.cn/ubuntu/" OS_Ubuntu_Speed_URL_Postfix },
{&Ali, "https://mirrors.aliyun.com/ubuntu",
"https://mirrors.aliyun.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Volcengine, "https://mirrors.volces.com/ubuntu",
"https://mirrors.volces.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Bfsu, "https://mirrors.bfsu.edu.cn/ubuntu",
"https://mirrors.bfsu.edu.cn/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Ustc, "https://mirrors.ustc.edu.cn/ubuntu",
"https://mirrors.ustc.edu.cn/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/ubuntu",
"https://mirrors.tuna.tsinghua.edu.cn/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Tencent, "https://mirrors.tencent.com/ubuntu",
{&Tencent, "https://mirrors.tencent.com/ubuntu",
"https://mirrors.tencent.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
// {&Tencent_Intra, "https://mirrors.tencentyun.com/ubuntu",
// "https://mirrors.tencentyun.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
{&Huawei, "https://mirrors.huaweicloud.com/ubuntu",
"https://mirrors.huaweicloud.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix}
{&upstream, "http://archive.ubuntu.com/ubuntu/", FeedByPrelude}, /* 不支持https */
{&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/",FeedByPrelude},
{&Ali, "https://mirrors.aliyun.com/ubuntu",FeedByPrelude},
{&Volcengine, "https://mirrors.volces.com/ubuntu",FeedByPrelude},
{&Bfsu, "https://mirrors.bfsu.edu.cn/ubuntu",FeedByPrelude},
{&Ustc, "https://mirrors.ustc.edu.cn/ubuntu",FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/ubuntu",FeedByPrelude},
{&Tencent, "https://mirrors.tencent.com/ubuntu", FeedByPrelude},
// {&Tencent_Intra, "https://mirrors.tencentyun.com/ubuntu",FeedByPrelude},
{&Huawei, "https://mirrors.huaweicloud.com/ubuntu",FeedByPrelude}
/* 不启用原因:过慢 */
// {&Netease, "https://mirrors.163.com/ubuntu",
// "https://mirrors.163.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix},
// {&Netease, "https://mirrors.163.com/ubuntu", FeedByPrelude},
/* 不启用原因:过慢 */
// {&Sohu, "https://mirrors.sohu.com/ubuntu",
// "https://mirrors.sohu.com/ubuntu" OS_Ubuntu_Speed_URL_Postfix}
// {&Sohu, "https://mirrors.sohu.com/ubuntu", FeedByPrelude}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "http://archive.ubuntu.com/ubuntu/dists/noble/Contents-amd64.gz");
chsrc_set_sources_speed_measure_url_with_postfix (this, "/dists/noble/Contents-amd64.gz");
}

View File

@@ -30,18 +30,18 @@ os_alpine_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "http://dl-cdn.alpinelinux.org/alpine", DelegateToUpstream},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine", DelegateToMirror},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine", DelegateToMirror},
{&Sustech, "https://mirrors.sustech.edu.cn/alpine", DelegateToMirror},
{&Zju, "https://mirrors.zju.edu.cn/alpine", DelegateToMirror},
{&Lzuoss, "https://mirror.lzu.edu.cn/alpine", DelegateToMirror},
{&Ali, "https://mirrors.aliyun.com/alpine", DelegateToMirror},
{&Tencent, "https://mirrors.cloud.tencent.com/alpine", DelegateToMirror},
{&Huawei, "https://mirrors.huaweicloud.com/alpine", DelegateToMirror}
{&upstream, "http://dl-cdn.alpinelinux.org/alpine", FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine", FeedByPrelude},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine", FeedByPrelude},
{&Sustech, "https://mirrors.sustech.edu.cn/alpine", FeedByPrelude},
{&Zju, "https://mirrors.zju.edu.cn/alpine", FeedByPrelude},
{&Lzuoss, "https://mirror.lzu.edu.cn/alpine", FeedByPrelude},
{&Ali, "https://mirrors.aliyun.com/alpine", FeedByPrelude},
{&Tencent, "https://mirrors.cloud.tencent.com/alpine", FeedByPrelude},
{&Huawei, "https://mirrors.huaweicloud.com/alpine", FeedByPrelude}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/alpine-standard-3.21.0-x86_64.iso");
chsrc_set_sources_speed_measure_url_with_postfix (this, "/latest-stable/releases/x86_64/alpine-standard-3.21.0-x86_64.iso");
}

View File

@@ -30,13 +30,13 @@ os_voidlinux_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "https://repo-default.voidlinux.org", DelegateToUpstream},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux", DelegateToMirror},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux", DelegateToMirror},
{&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux", DelegateToMirror}
{&upstream, "https://repo-default.voidlinux.org", FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux", FeedByPrelude},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux", FeedByPrelude},
{&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux", FeedByPrelude}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-musl-20240314-xfce.iso");
chsrc_set_sources_speed_measure_url_with_postfix (this, "/live/20240314/void-live-x86_64-musl-20240314-xfce.iso");
}

View File

@@ -28,12 +28,12 @@ os_almalinux_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "http://repo.almalinux.org/almalinux", DelegateToUpstream},
{&Ali, "https://mirrors.aliyun.com/almalinux", DelegateToMirror},
{&Volcengine, "https://mirrors.volces.com/almalinux", DelegateToMirror},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux", DelegateToMirror},
{&Zju, "https://mirrors.zju.edu.cn/almalinux", DelegateToMirror},
{&Nju, "https://mirror.nju.edu.cn/almalinux", DelegateToMirror}
{&upstream, "http://repo.almalinux.org/almalinux", FeedByPrelude},
{&Ali, "https://mirrors.aliyun.com/almalinux", FeedByPrelude},
{&Volcengine, "https://mirrors.volces.com/almalinux", FeedByPrelude},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux", FeedByPrelude},
{&Zju, "https://mirrors.zju.edu.cn/almalinux", FeedByPrelude},
{&Nju, "https://mirror.nju.edu.cn/almalinux", FeedByPrelude}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://raw.repo.almalinux.org/almalinux/9.5/isos/x86_64/AlmaLinux-9-latest-x86_64-minimal.iso");

View File

@@ -31,21 +31,21 @@ os_openeuler_prelude ()
chef_set_note(this, NULL, NULL);
def_sources_begin()
{&upstream, "https://repo.openeuler.org/", DelegateToUpstream},
{&Ali, "https://mirrors.aliyun.com/openeuler/", DelegateToMirror},
{&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/", DelegateToMirror},
{&Ustc, "https://mirrors.ustc.edu.cn/openeuler/", DelegateToMirror},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/", DelegateToMirror},
{&Tencent, "https://mirrors.tencent.com/openeuler/", DelegateToMirror}
// {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/", DelegateToMirror},
{&upstream, "https://repo.openeuler.org/", FeedByPrelude},
{&Ali, "https://mirrors.aliyun.com/openeuler/", FeedByPrelude},
{&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/", FeedByPrelude},
{&Ustc, "https://mirrors.ustc.edu.cn/openeuler/", FeedByPrelude},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/", FeedByPrelude},
{&Tencent, "https://mirrors.tencent.com/openeuler/", FeedByPrelude}
// {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/", FeedByPrelude},
/* 不启用原因:过慢 */
// {&Netease, "https://mirrors.163.com/openeuler/", DelegateToMirror}
// {&Netease, "https://mirrors.163.com/openeuler/", FeedByPrelude}
/* 不启用原因:过慢 */
// {&Sohu, "https://mirrors.sohu.com/openeuler/", DelegateToMirror}
// {&Sohu, "https://mirrors.sohu.com/openeuler/", FeedByPrelude}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://repo.openeuler.org/openEuler-24.03-LTS/ISO/x86_64/openEuler-24.03-LTS-netinst-x86_64-dvd.iso");
chsrc_set_sources_speed_measure_url_with_postfix (this, "https://repo.openeuler.org/openEuler-24.03-LTS/ISO/x86_64/openEuler-24.03-LTS-netinst-x86_64-dvd.iso");
}