Skip to content

Commit 883876e

Browse files
jialinlvcnccmywish
authored andcommitted
Fix Flathub and add upstream
1 parent edaca65 commit 883876e

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

src/recipe/ware/Flathub.c

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,38 @@
44
* File Authors : Aoran Zeng <[email protected]>
55
* Contributors : Nil Null <[email protected]>
66
* Created On : <2023-09-11>
7-
* Last Modified : <2024-08-15>
7+
* Last Modified : <2025-03-17>
88
* ------------------------------------------------------------*/
99

1010
/**
11-
* @update 2023-09-11
12-
* @note 目前只有一个源
11+
* @update 2025-03-17
12+
* @note 加入官方仓库
13+
* @note SJTUG分为两个镜像站 思源站和致远站 以解决思源站可能无法访问的问题
1314
*/
15+
static SourceProvider_t wr_flathub_upstream =
16+
{
17+
"Flathub", "Flathub", "Flathub官方仓库", "https://flathub.org/repo",
18+
// 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug
19+
{NotSkip, NA, NA, "https://flathub.org/repo/flathub.gpg"}
20+
},
21+
22+
wr_flathub_siyuan =
23+
{
24+
"sjtu", "SJTUG-siyuan", "上海交通大学思源镜像站Flathub", "https://mirror.sjtu.edu.cn/",
25+
{NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/flathub/flathub.gpg"}
26+
},
27+
28+
wr_flathub_zhiyuan =
29+
{
30+
"sjtu", "SJTUG-zhiyuan", "上海交通大学致远镜像站Flathub", "https://mirrors.sjtug.sjtu.edu.cn/",
31+
{NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/flathub/flathub.gpg"}
32+
};
33+
1434
static Source_t wr_flathub_sources[] =
1535
{
16-
{&UpstreamProvider, NULL},
17-
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"},
36+
{&wr_flathub_upstream, "https://flathub.org/repo"},
37+
{&wr_flathub_siyuan, "https://mirror.sjtu.edu.cn/flathub"},
38+
{&wr_flathub_zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/flathub"},
1839
};
1940
def_sources_n(wr_flathub);
2041

@@ -34,6 +55,11 @@ wr_flathub_setsrc (char *option)
3455
);
3556
puts (note);
3657

58+
char *repo_note = "Flathub 中部分软件由于重分发授权问题,需要从官方服务器下载,无法使用镜像站加速\n"
59+
"比如 NVIDIA 驱动、JetBrains 系列软件等\n"
60+
"尝试运行 flatpak remote-modify flathub --url=https://flathub.org/repo";
61+
puts (repo_note);
62+
3763
char *cmd = xy_2strjoin ("flatpak remote-modify flathub --url=", source.url);
3864
chsrc_run (cmd, RunOpt_Default);
3965

0 commit comments

Comments
 (0)