From b7ad60eb20fd02e18bc68ce6507dc9218ee5f128 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 21 Jan 2026 19:20:59 +0800 Subject: [PATCH] =?UTF-8?q?`Ubuntu`=20=E6=A3=80=E6=B5=8B=E6=9E=B6=E6=9E=84?= =?UTF-8?q?=E6=8F=90=E5=89=8D=E8=87=B3=20`prelude`=20=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recipe/os/APT/Ubuntu.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index 56ee02d..db3a0fd 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -11,8 +11,8 @@ os_ubuntu_prelude () chef_prep_this (os_ubuntu, gsr); chef_set_created_on (this, "2023-08-30"); - chef_set_last_updated (this, "2026-01-20"); - chef_set_sources_last_updated (this, "2026-01-20"); + chef_set_last_updated (this, "2026-01-21"); + chef_set_sources_last_updated (this, "2026-01-21"); chef_set_chef (this, NULL); chef_set_cooks (this, 2, "@ccmywish", "@G_I_Y"); @@ -43,6 +43,13 @@ os_ubuntu_prelude () // {&Sohu, "https://mirrors.sohu.com/ubuntu", FeedByPrelude} def_sources_end() + char *arch = chsrc_get_cpuarch (); + // Ubuntu 非 x86_64 架构的默认源地址有所不同 + if (strncmp (arch, "x86_64", 6)!=0) + { + chef_set_repoURL (this, &UpstreamProvider, "http://ports.ubuntu.com/ubuntu"); + } + chef_set_rest_smURL_with_postfix (this, "/dists/noble/Contents-amd64.gz"); } @@ -148,13 +155,5 @@ os_ubuntu_setsrc (char *option) void os_ubuntu_resetsrc (char *option) { - chef_use_this (os_ubuntu); - char *arch = chsrc_get_cpuarch (); - if (strncmp (arch, "x86_64", 6)!=0) - { - // Ubuntu 非 x86_64 架构的源地址有所不同 - chef_set_repoURL (this, &UpstreamProvider, "http://ports.ubuntu.com/ubuntu"); - // this->sources[0].url = "http://ports.ubuntu.com/ubuntu"; - } os_ubuntu_setsrc (option); }