-
Notifications
You must be signed in to change notification settings - Fork 57
提供优化proot-distro下载速度备选方案与python安装方式修正 #87
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
base: v4
Are you sure you want to change the base?
提供优化proot-distro下载速度备选方案与python安装方式修正 #87
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.
你好,我已经审查了你的更改,这里是一些反馈:
- 推荐的 PD_OVERRIDE_TARBALL_URL/PD_OVERRIDE_TARBALL_SHA256 值是写死到某个特定的 proot-distro 版本上的,建议添加说明或机制,在未来 proot-distro 更新时保持这些值同步,以避免用户遇到 404 或校验和不匹配的问题。
- 在 install-py310.sh 代码片段中,建议增加一些基础的健壮性处理(例如使用
set -e、检查wget是否成功、清理已下载的安装程序,以及为$miniconda_version等变量加上引号),以减少出现部分安装或损坏安装的可能性。
给 AI Agent 的提示
请根据这次代码审查中的评论进行修改:
## 总体评论
- 推荐的 PD_OVERRIDE_TARBALL_URL/PD_OVERRIDE_TARBALL_SHA256 值是写死到某个特定的 proot-distro 版本上的,建议添加说明或机制,在未来 proot-distro 更新时保持这些值同步,以避免用户遇到 404 或校验和不匹配的问题。
- 在 install-py310.sh 代码片段中,建议增加一些基础的健壮性处理(例如使用 `set -e`、检查 `wget` 是否成功、清理已下载的安装程序,以及为 `$miniconda_version` 等变量加上引号),以减少出现部分安装或损坏安装的可能性。
## 单条评论
### 评论 1
<location> `zh/deploy/astrbot/termux.md:98` </location>
<code_context>
+> `https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/`替换为`https://repo.anaconda.com/miniconda/`
-<!--这里如果安装 miniconda 或者 anaconda 都会有报错,不知道为什么-->
+全部复制以下语句中运行
+<!-- 这里优化了大陆网络环境,修复了miniconda报错问题 -->
</code_context>
<issue_to_address>
**suggestion (typo):** 这句话语序略显别扭,建议去掉“中”或补充连接词
可以改为“全部复制以下语句后运行”或“全部复制以下语句并运行”,这样读起来更自然也更清楚。
```suggestion
全部复制以下语句后运行
```
</issue_to_address>
### 评论 2
<location> `zh/deploy/astrbot/termux.md:100` </location>
<code_context>
-<!--这里如果安装 miniconda 或者 anaconda 都会有报错,不知道为什么-->
+全部复制以下语句中运行
+<!-- 这里优化了大陆网络环境,修复了miniconda报错问题 -->
```bash
-apt update && apt install software-properties-common
</code_context>
<issue_to_address>
**nitpick (typo):** “miniconda”建议改为首字母大写的“Miniconda”
这样可与官方命名保持一致,并提升文档中工具名称的一致性。
```suggestion
<!-- 这里优化了大陆网络环境,修复了 Miniconda 报错问题 -->
```
</issue_to_address>帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey there - I've reviewed your changes - here's some feedback:
- The recommended PD_OVERRIDE_TARBALL_URL/PD_OVERRIDE_TARBALL_SHA256 values are hardcoded to a specific proot-distro release, so consider adding a note or mechanism to keep these in sync with future proot-distro updates to avoid users hitting 404s or mismatched checksums.
- In the install-py310.sh snippet, consider adding basic robustness (e.g.,
set -e, checking thatwgetsucceeds, cleaning up the downloaded installer, and quoting variables like$miniconda_version) to reduce the chance of partial or broken installations.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The recommended PD_OVERRIDE_TARBALL_URL/PD_OVERRIDE_TARBALL_SHA256 values are hardcoded to a specific proot-distro release, so consider adding a note or mechanism to keep these in sync with future proot-distro updates to avoid users hitting 404s or mismatched checksums.
- In the install-py310.sh snippet, consider adding basic robustness (e.g., `set -e`, checking that `wget` succeeds, cleaning up the downloaded installer, and quoting variables like `$miniconda_version`) to reduce the chance of partial or broken installations.
## Individual Comments
### Comment 1
<location> `zh/deploy/astrbot/termux.md:98` </location>
<code_context>
+> `https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/`替换为`https://repo.anaconda.com/miniconda/`
-<!--这里如果安装 miniconda 或者 anaconda 都会有报错,不知道为什么-->
+全部复制以下语句中运行
+<!-- 这里优化了大陆网络环境,修复了miniconda报错问题 -->
</code_context>
<issue_to_address>
**suggestion (typo):** 这句话语序略显别扭,建议去掉“中”或补充连接词
可以改为“全部复制以下语句后运行”或“全部复制以下语句并运行”,这样读起来更自然也更清楚。
```suggestion
全部复制以下语句后运行
```
</issue_to_address>
### Comment 2
<location> `zh/deploy/astrbot/termux.md:100` </location>
<code_context>
-<!--这里如果安装 miniconda 或者 anaconda 都会有报错,不知道为什么-->
+全部复制以下语句中运行
+<!-- 这里优化了大陆网络环境,修复了miniconda报错问题 -->
```bash
-apt update && apt install software-properties-common
</code_context>
<issue_to_address>
**nitpick (typo):** “miniconda”建议改为首字母大写的“Miniconda”
这样可与官方命名保持一致,并提升文档中工具名称的一致性。
```suggestion
<!-- 这里优化了大陆网络环境,修复了 Miniconda 报错问题 -->
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
zh/deploy/astrbot/termux.md
Outdated
| >[!TIP] | ||
| >中国大陆概率访问`GitHub`,故建议使用加速器或代理 | ||
| > | ||
| >或者也可以执行这两条指令来使用镜像 | ||
| >```bash | ||
| >export PD_OVERRIDE_TARBALL_URL=https://ghfast.top/github.com/termux/proot-distro/releases/download/v4.30.1/ubuntu-questing-aarch64-pd-v4.30.1.tar.xz | ||
| >export PD_OVERRIDE_TARBALL_SHA256=5ab35b90cd9a9f180656261ba400a135c4c01c2da4b74522118342f985c2d328 | ||
| >``` | ||
| ```bash | ||
| proot-distro install ubuntu |
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.
这里应该先写正常情况,然后再是什么加速的什么的
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.
下周搞
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.
。。。
fix: 移动 proot-distro 安装命令至正确位置
本PR解决了大陆地区下载PDubuntu的tarball过慢的问题
修改:并将由原来的第三方PPA安装改为从miniconda安装python(自#86 )
Summary by Sourcery
改进 AstrBot 的 Termux 部署文档,以更好地支持 Python 3.10 的安装,并优化中国大陆地区的下载体验。
Documentation:
Original summary in English
Summary by Sourcery
Improve Termux deployment docs for AstrBot to better support Python 3.10 installation and downloads in mainland China.
Documentation: