mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-07 18:54:05 +08:00
Revert "Fix flathub"
This reverts commit c38dcd5f5ac3cb27253606e8ab1fe2206d00ac1c.
This commit is contained in:
parent
ca1ad698b2
commit
9db5d0d89a
@ -36,23 +36,12 @@
|
||||
{NotSkip, NA, NA, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin"}
|
||||
},
|
||||
|
||||
/**
|
||||
* @note 2025-3-17 SJTUG 共设两台服务器。思源服务器同步新镜像,致远服务器兼容原 SJTU 镜像站。
|
||||
* @note 有些target(例如flathub)思源站的兼容性不好,可以考虑将两个服务器分开测试
|
||||
*/
|
||||
|
||||
Sjtug_Zhiyuan =
|
||||
{
|
||||
"sjtu", "SJTUG-zhiyuan", "上海交通大学致远镜像站", "https://mirrors.sjtug.sjtu.edu.cn/",
|
||||
{NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan}
|
||||
},
|
||||
|
||||
Sjtug_Siyuan =
|
||||
{
|
||||
"sjtu", "SJTUG-siyuan", "上海交通大学思源镜像站", "https://mirror.sjtu.edu.cn/",
|
||||
{NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/ctan" Big_File_ctan}
|
||||
},
|
||||
|
||||
Zju =
|
||||
{
|
||||
"zju", "ZJU", "浙江大学开源软件镜像站", "https://mirrors.zju.edu.cn/",
|
||||
@ -231,4 +220,3 @@
|
||||
"sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/",
|
||||
{NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin}
|
||||
};
|
||||
|
@ -2,50 +2,26 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* -------------------------------------------------------------
|
||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Contributors : Jialin Lyu <jialinlvcn@aliyun.com>
|
||||
* Contributors : Nil Null <nil@null.org>
|
||||
* Created On : <2023-09-11>
|
||||
* Last Modified : <2025-03-17>
|
||||
* Last Modified : <2024-08-15>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @update 2023-09-11
|
||||
* @note 目前只有一个源
|
||||
* @update 2025-03-17
|
||||
* @note 加入官方仓库
|
||||
* @note SJTUG分为两个镜像站 思源站和致远站 以解决思源站可能无法访问的问题
|
||||
*/
|
||||
static Source_t wr_flathub_sources[] =
|
||||
{
|
||||
{&UpstreamProvider, NULL},
|
||||
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"},
|
||||
};
|
||||
def_sources_n(wr_flathub);
|
||||
|
||||
|
||||
/**
|
||||
* @consult https://mirrors.sjtug.sjtu.edu.cn/docs/flathub
|
||||
*/
|
||||
static MirrorSite_t UpstreamFlathub =
|
||||
{
|
||||
"Flathub", "Flathub", "Flathub官方仓库", "https://flathub.org/repo",
|
||||
// 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug
|
||||
{NotSkip, NA, NA, "https://flathub.org/repo/flathub.gpg"}
|
||||
},
|
||||
|
||||
Sjtug_Siyuan_Flathub =
|
||||
{
|
||||
"sjtu", "SJTUG-siyuan", "上海交通大学思源镜像站Flathub", "https://mirror.sjtu.edu.cn/",
|
||||
{NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/flathub/flathub.gpg"}
|
||||
},
|
||||
|
||||
Sjtug_Zhiyuan_Flathub =
|
||||
{
|
||||
"sjtu", "SJTUG-zhiyuan", "上海交通大学致远镜像站Flathub", "https://mirrors.sjtug.sjtu.edu.cn/",
|
||||
{NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/flathub/flathub.gpg"}
|
||||
};
|
||||
|
||||
static Source_t wr_flathub_sources[] =
|
||||
{
|
||||
{&UpstreamFlathub, "https://flathub.org/repo"},
|
||||
{&Sjtug_Siyuan_Flathub, "https://mirror.sjtu.edu.cn/flathub"},
|
||||
{&Sjtug_Zhiyuan_Flathub, "https://mirrors.sjtug.sjtu.edu.cn/flathub"},
|
||||
};
|
||||
def_sources_n(wr_flathub);
|
||||
|
||||
void
|
||||
wr_flathub_setsrc (char *option)
|
||||
{
|
||||
@ -58,13 +34,6 @@ wr_flathub_setsrc (char *option)
|
||||
);
|
||||
puts (note);
|
||||
|
||||
char *repo_note = xy_strjoin (1,
|
||||
"Flathub 中部分软件由于重分发授权问题,需要从官方服务器下载,无法使用镜像站加速\n"
|
||||
"比如 NVIDIA 驱动、JetBrains 系列软件等\n"
|
||||
"尝试运行 flatpak remote-modify flathub --url=https://flathub.org/repo"
|
||||
);
|
||||
puts (repo_note);
|
||||
|
||||
char *cmd = xy_2strjoin ("flatpak remote-modify flathub --url=", source.url);
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user