-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flathub
chsrc
#179
Fix flathub
chsrc
#179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢你在此问题上的投入!👍 代码还需要一点修改即可被我们接受。我觉得你可以分两次 commit,一次 commit 用于在 mirror.c 中增加思源镜像站,一次 commit 用于调整 flathub 的这个问题。
src/framework/mirror.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件的变动似乎是添加了 Sjtug_Siyuan 这个镜像站,但是可能是你的编辑器或者其他操作使得 GitHub 显示对这个文件进行了巨大的更改,以致于无法看清你的修改。
所以能否重新删除这次 commit 重新提交一次,保持 diff 的清晰?
* ------------------------------------------------------------*/ | ||
|
||
/** | ||
* @update 2023-09-11 | ||
* @note 目前只有一个源 | ||
* @update 2025-03-17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 @update
表示的是源的最后更新时间,只需要把 2023 那个时间覆盖掉即可。
@note
可以把之前的删掉
src/recipe/ware/Flathub.c
Outdated
|
||
|
||
/** | ||
* @consult https://mirrors.sjtug.sjtu.edu.cn/docs/flathub | ||
*/ | ||
static MirrorSite_t UpstreamFlathub = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按照我们之前的命名惯例(可参考 Java.c,Ruby.c),这里应该叫做 wr_flathub_upstream
。
结构体是 SourceProvider_t
src/recipe/ware/Flathub.c
Outdated
{NotSkip, NA, NA, "https://flathub.org/repo/flathub.gpg"} | ||
}, | ||
|
||
Sjtug_Siyuan_Flathub = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我理解的是,你通过额外定义两个“虚拟”的镜像站,目的是为了检测 /flathub/flathub.gpg
这个文件能不能访问到,访问到的测速就不为0,就能被选中?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,检测/flathub/flathub.gpg可能存在502的情况,此时需要跳过。
src/recipe/ware/Flathub.c
Outdated
@@ -34,6 +58,13 @@ wr_flathub_setsrc (char *option) | |||
); | |||
puts (note); | |||
|
|||
char *repo_note = xy_strjoin (1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xy_strjoin(n) 是用于字符串拼接的。这个地方显然不需要拼接,直接用双引号字符串即可
This reverts commit c38dcd5.
最后分别在: 这三个地方加上你的贡献信息即可 👍 |
感谢你的贡献,辛苦了 ❤️ Happy changing source~ |
描述
问题的背景
Flathub
上海交通大学镜像站存在不兼容的问题相关 issue
这个PR做了什么
Ware Flathub
换源mirror.c
中区分了上海交通大学思源镜像站和致远镜像站方案
实现
Flathub.c
中用于测试的MirrorSite_t
和对应的测试链接测试