mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-02 20:46:15 +08:00
parent
7c75b37d09
commit
cd7281600e
|
@ -579,17 +579,6 @@ get_max_ele_idx_in_dbl_ary (double *array, int size)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 默认上游源时不测速的,该函数改变该行为,测速上游源
|
||||
*/
|
||||
void
|
||||
chsrc_set_measure_upstream (char *url)
|
||||
{
|
||||
SpeedMeasureInfo_t *upsmi = &UpstreamProvider.smi;
|
||||
upsmi->skip = NotSkip;
|
||||
upsmi->url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sources 所有待测源
|
||||
* @param size 待测源的数量
|
||||
|
|
|
@ -9,11 +9,18 @@
|
|||
* Last Modified : <2024-11-22>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static SourceProvider_t UpstreamUbuntu =
|
||||
{
|
||||
"upstream", "archive.ubuntu.com", "上游默认源 archive.ubuntu.com", "http://archive.ubuntu.com/",
|
||||
// https://github.com/RubyMetric/chsrc/issues/121
|
||||
{NotSkip, NA, NA, "http://archive.ubuntu.com/ubuntu/dists/noble/Contents-amd64.gz"}
|
||||
};
|
||||
|
||||
/**
|
||||
* @update 2024-11-21
|
||||
*/
|
||||
static Source_t
|
||||
os_ubuntu_sources[] = {
|
||||
static Source_t os_ubuntu_sources[] =
|
||||
{
|
||||
{&UpstreamProvider, "http://archive.ubuntu.com/ubuntu/"}, //不支持https
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/"},
|
||||
{&Ali, "https://mirrors.aliyun.com/ubuntu"},
|
||||
|
@ -88,9 +95,6 @@ os_ubuntu_setsrc (char *option)
|
|||
{
|
||||
chsrc_ensure_root ();
|
||||
|
||||
// https://github.com/RubyMetric/chsrc/issues/121
|
||||
chsrc_set_measure_upstream ("http://archive.ubuntu.com/ubuntu/dists/noble/Contents-amd64.gz");
|
||||
|
||||
if (chsrc_check_file (OS_Ubuntu_SourceList_DEB822))
|
||||
{
|
||||
char *msg = CliOpt_InEnglish ? "Will change source based on new format"
|
||||
|
|
Loading…
Reference in New Issue
Block a user