Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/chsrc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ chsrc_register_contributors ()
// 该 ID 为 Gitee ID
chef_register_contributor ("@hezonglun", "HeZongLun", "hezonglun123456@outlook.com", NULL);
chef_register_contributor ("@Young-Lord", "LY", "ly-niko@qq.com", NULL);
chef_register_contributor ("@MingriLingran", "MingriLingran", "i@linran.moe", NULL);
chef_register_contributor ("@MingriLingran", "MingriLingran", "i@linran.moe", NULL);
chef_register_contributor ("@usernameisnull", "MaBing", "cumt_ttr@163.com", NULL);

/**
* AI贡献者:
Expand Down
17 changes: 12 additions & 5 deletions src/recipe/os/APT/Ubuntu.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接在这两个函数里修改 source.url = ,会导致 chsrc set ubuntu 选中任何镜像站的时候都使用这个值。

所以这个默认值,确实得在其他地方修改。应该在 os_ubuntu_resetsrc() 中使用:

  use_this (os_ubuntu);
  this->sources[0].url = "http://ports.ubuntu.com/ubuntu-ports";
  os_ubuntu_setsrc (option);

Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ os_ubuntu_prelude ()
chef_prep_this (os_ubuntu, gsr);

chef_set_created_on (this, "2023-08-30");
chef_set_last_updated (this, "2025-08-10");
chef_set_sources_last_updated (this, "2025-07-11");
chef_set_last_updated (this, "2026-01-20");
chef_set_sources_last_updated (this, "2026-01-20");

chef_set_chef (this, NULL);
chef_set_cooks (this, 2, "@ccmywish", "@G_I_Y");
chef_set_sauciers (this, 1, "@XUANJI233");
chef_set_sauciers (this, 2, "@XUANJI233", "@usernameisnull");

chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_deny_english(this);
Expand All @@ -25,8 +25,8 @@ os_ubuntu_prelude ()
chef_set_note(this, NULL, NULL);

def_sources_begin()
{&UpstreamProvider, "http://archive.ubuntu.com/ubuntu/", FeedByPrelude}, /* 不支持https */
{&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/",FeedByPrelude},
{&UpstreamProvider, "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},
Expand Down Expand Up @@ -148,5 +148,12 @@ os_ubuntu_setsrc (char *option)
void
os_ubuntu_resetsrc (char *option)
{
use_this (os_ubuntu);
char *arch = chsrc_get_cpuarch ();
if (strncmp (arch, "x86_64", 6)!=0)
{
// ubuntu arm的源地址和x86_64不一样
this->sources[0].url = "http://ports.ubuntu.com/ubuntu";
}
os_ubuntu_setsrc (option);
}