From 64513e8d15227502ade4d9b9fa9118fe732dbe4a Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sun, 13 Jul 2025 21:34:32 +0800 Subject: [PATCH] Update some wares --- src/recipe/ware/Emacs.c | 24 ++++++++++++++++++++---- src/recipe/ware/Flathub.c | 10 +++++----- src/recipe/ware/Guix.c | 28 ++++++++++++++++++++++------ 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index c7e565f..73206fa 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -4,7 +4,7 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2023-10-10> - * Last Modified : <2024-11-21> + * Last Modified : <2025-07-13> * ------------------------------------------------------------*/ static MirrorSite_t EmacsChina = @@ -15,12 +15,13 @@ static MirrorSite_t EmacsChina = }; /** - * @update 2023-09-10 + * @update 2025-07-13 * @note Emacs用户往往只需要一次性换源,只会极少次调用 chsrc,我们只给用户提供文档 */ Source_t wr_emacs_sources[] = { - {&UpstreamProvider, NULL}, + {&UpstreamProvider, NULL, NULL}, + {&MirrorZ, "https://help.mirrors.cernet.edu.cn/elpa/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"}, @@ -43,4 +44,19 @@ wr_emacs_setsrc (char *option) chsrc_conclude (&source); } -def_target_s (wr_emacs); + +Feature_t +wr_emacs_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.can_english = false; + f.can_user_define = false; + + return f; +} + +def_target_sf(wr_emacs); diff --git a/src/recipe/ware/Flathub.c b/src/recipe/ware/Flathub.c index 5de8ef9..1d32327 100644 --- a/src/recipe/ware/Flathub.c +++ b/src/recipe/ware/Flathub.c @@ -28,21 +28,21 @@ wr_flathub_siyuan = { IS_DedicatedMirrorSite, "sjtu-sy", "SJTUG-siyuan", "上海交通大学思源镜像站Flathub", "https://mirror.sjtu.edu.cn/", - {NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/flathub/flathub.gpg"} + {NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/flathub/flathub.gpg", ROUGH} /* 由于实在找不到其他可测文件,所以这也只能是 ROUGH */ }, wr_flathub_zhiyuan = { IS_DedicatedMirrorSite, "sjtu-zy", "SJTUG-zhiyuan", "上海交通大学致远镜像站Flathub", "https://mirrors.sjtug.sjtu.edu.cn/", - {NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/flathub/flathub.gpg"} + {NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/flathub/flathub.gpg", ROUGH} }; static Source_t wr_flathub_sources[] = { - {&wr_flathub_upstream, "https://flathub.org/repo"}, - {&wr_flathub_siyuan, "https://mirror.sjtu.edu.cn/flathub"}, - {&wr_flathub_zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/flathub"}, + {&wr_flathub_upstream, "https://flathub.org/repo", NULL}, + {&wr_flathub_siyuan, "https://mirror.sjtu.edu.cn/flathub", DelegateToMirror}, + {&wr_flathub_zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/flathub", DelegateToMirror}, }; def_sources_n(wr_flathub); diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index 66436a4..b06773c 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -4,17 +4,18 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2023-09-11> - * Last Modified : <2024-08-15> + * Last Modified : <2025-07-13> * ------------------------------------------------------------*/ /** - * @update 2023-09-11 - * @note 目前只有一个源 + * @update 2025-07-13 + * + * @note 目前只有一个源, guixcn 的源不知道是否可用 */ static Source_t wr_guix_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"} + {&UpstreamProvider, NULL, NULL}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git", DelegateToMirror} }; def_sources_n(wr_guix); @@ -38,4 +39,19 @@ wr_guix_setsrc (char *option) chsrc_conclude (&source); } -def_target_s (wr_guix); + +Feature_t +wr_guix_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.can_english = false; + f.can_user_define = false; + + return f; +} + +def_target_sf(wr_guix);