Skip to content

Commit 3f82ef3

Browse files
committed
更新 AlmaLinux 的精准测速链接
1 parent 2a3aa24 commit 3f82ef3

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/framework/chef.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,28 @@ chef_register_contributor (char *id, char *name, char *email, char *display_name
9191

9292
/**
9393
* @brief 修改 Provider 的测速地址
94+
*
95+
* @note 这个修改的是全局 Provider 里的信息。往往用来设置 UpstreamProvider
9496
*/
9597
void
9698
chef_set_provider_speed_measure_url (SourceProvider_t *provider, char *url)
9799
{
98100
provider->psmi.skip = NotSkip;
99101
provider->psmi.url = xy_strdup (url);
100-
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, " 设置测速链接: ", url));
102+
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速链接: ", url));
101103
}
102104

103105

104106
/**
105107
* @brief 修改 Provider 的测速精度
108+
*
109+
* @note 这个修改的是全局 Provider 里的信息。往往用来设置 UpstreamProvider
106110
*/
107111
void
108112
chef_set_provider_speed_measure_accuracy (SourceProvider_t *provider, bool accuracy)
109113
{
110114
provider->psmi.accurate = accuracy;
111-
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, " 设置测速精度: ", accuracy ? "精准" : "粗略"));
115+
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速精度: ", accuracy ? "精准" : "粗略"));
112116
}
113117

114118

src/recipe/os/YUM/AlmaLinux.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ os_almalinux_prelude ()
1111

1212
chef_set_created_on (this, "2024-06-12");
1313
chef_set_last_updated (this, "2025-08-10");
14-
chef_set_sources_last_updated (this, "2024-12-18");
14+
chef_set_sources_last_updated (this, "2025-08-22");
1515

1616
chef_set_chef (this, NULL);
1717
chef_set_cooks (this, 1, "@ccmywish");
@@ -24,15 +24,18 @@ os_almalinux_prelude ()
2424
chef_set_note(this, NULL, NULL);
2525

2626
def_sources_begin()
27-
{&UpstreamProvider, "http://repo.almalinux.org/almalinux", FeedByPrelude},
27+
{&UpstreamProvider, "http://repo.almalinux.org/almalinux", DelegateToUpstream},
2828
{&Ali, "https://mirrors.aliyun.com/almalinux", FeedByPrelude},
2929
{&Volcengine, "https://mirrors.volces.com/almalinux", FeedByPrelude},
3030
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux", FeedByPrelude},
3131
{&Zju, "https://mirrors.zju.edu.cn/almalinux", FeedByPrelude},
3232
{&Nju, "https://mirror.nju.edu.cn/almalinux", FeedByPrelude}
3333
def_sources_end()
3434

35-
chef_set_provider_speed_measure_url (&UpstreamProvider, "https://raw.repo.almalinux.org/almalinux/9.5/isos/x86_64/AlmaLinux-9-latest-x86_64-minimal.iso");
35+
#define link "/9.6/isos/x86_64/AlmaLinux-9-latest-x86_64-minimal.iso"
36+
chef_set_sources_speed_measure_url_with_postfix (this, link);
37+
chef_set_provider_speed_measure_url (&UpstreamProvider, "https://raw.repo.almalinux.org/almalinux" link);
38+
#undef link
3639
}
3740

3841
/**

0 commit comments

Comments
 (0)