Fix measure upstream for Ubuntu

[GitHub #121]
This commit is contained in:
Aoran Zeng
2024-11-22 11:08:36 +08:00
parent 7c75b37d09
commit cd7281600e
2 changed files with 9 additions and 16 deletions

View File

@@ -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"