Repository navigation
Conversation
prepareAndroidSide() 只有两条来源:已安装的 runtime-current/android-side, 或随包 assets/runtime/android-side.tar.*。两者都缺时(典型:CI 只 clone 源码、 未生成 runtime/android-assets 的构建产物),当前实现会先下载完 base 清单的 全部软件包,才在 prepareAndroidSide 返回 false 时报 ONLINE_ASIDE —— 用户看到 的就是"反复下载 159 个包、始终装不上",而失败与网络无关。 本补丁把同一判断提前到 manifest 校验之后、下载之前;错误码与用户文案 保持不变,只把数分钟的无效下载缩短到秒级。在真机(iQOO 15 / Android 17) 上验证:注入 android-side 层后 layers=[base, android-side] 安装成功。
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
在线导入 Debian 运行环境时,如果包里没有 android-side 层,用户会看到无限循环下载:
正在下载软件包 73/159 … → 重新开始 → 73/159 …,每轮数分钟,永不收敛。根因
prepareAndroidSide()(OnlineRuntimeImportManager.kt:786)只有两条来源:runtime-current/android-side;assets/runtime/android-side.tar.*。两者都缺时(典型场景:CI 只 clone 源码、未生成
runtime/android-assets的构建产物——runtime/不在源码仓库内),该函数在下载完 159 个包之后才返回false,报
ONLINE_ASIDE: cannot prepare android-side layer。用户视角即"反复下载、始终装不上",且容易被误判为网络问题。
实测复现(iQOO 15 / Android 17 / SDK 37)
assets/runtime/):三台环境一致的设备上 100% 复现循环;android-side.tar.zst(sha256 与官方清单一致)注入files/runtime/runtime-current/android-side后重启,立即成功:installAssembledRuntime: assembled body installed (layers=[base, android-side]),界面转「Debian 层 已就绪」。
修改
把同一个判断提前到 manifest 校验之后、下载之前(新增
hasAndroidSideSource(),15 行)。错误码
ONLINE_ASIDE与用户文案完全不变(不新增字符串资源,不影响 i18n),只是把数分钟的无效下载缩短到秒级,并把失败原因暴露在第一时间。
已在 fork 的 build-only 工作流验证编译通过(commit 33f07ac)。
关联
本 PR 决定在线导入在资产缺失时是否快速失败。