[Bug] Arch Linux 点击 "restart to update" 后未重启更新并替换安装包
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
其他 / 不确定 · Other / Not sure
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
在 Arch Linux 上,ZCode 桌面端自动更新流程在用户点击“Restart to update”后没有实际安装已下载的新版本。
ZCode 可以正常检测并下载新版本,下载后的安装包也可以手动验证并正常启动。但是点击“Restart to update”后,ZCode 退出并重新启动,仍然运行旧版本,并继续提示相同的更新。
复现步骤 · Steps to reproduce
- 在 Arch Linux x86_64 上使用系统级安装的 ZCode。
- 当前 ZCode 版本为 3.5.3,安装路径为
/opt/ZCode。 - ZCode 检测到 3.7.7 有可用更新,并成功下载更新包。
- 点击“Restart to update”。
- ZCode 退出并重新启动。
- 检查 ZCode 版本。
- 观察到 ZCode 仍然是 3.5.3,并继续提示 3.7.7 可用。
期望表现 · Expected behavior
点击“Restart to update”后,客户端应该完成完整的自动更新流程:
- 退出旧版本。
- 使用已经下载的新版本安装包完成安装。
- 启动新版本 ZCode。
- 启动后本地版本应为 3.7.7,不再重复提示相同的更新.
请检查 Linux 版本(除 Debian 外)的 electron-updater 在系统级安装到 /opt/ZCode 时的最终安装阶段,尤其是:
- updater 是否能够处理 root-owned 的
/opt/ZCode; - quitAndInstall / restart 后是否实际执行了 .deb 的安装;
- 是否需要通过 privileged helper 完成
/opt/ZCode的替换; - 如果当前 Linux 更新机制不支持系统级安装,是否应该明确提示用户需要管理员权限,或者提供用户级安装方式。
这个问题与 macOS 自动更新问题 #75 的现象比较相似:更新包已经下载,但点击“重启更新”后最终安装/替换没有完成。我想在 Linux上也实时体验到最新模型 GLM 5.3
实际表现 · Actual behavior
ZCode 在点击“Restart to update”后退出并重新启动,但安装目录 /opt/ZCode 没有被更新。
重新启动后仍然运行 3.5.3,并继续提示 3.7.7 可用。
但是,手动处理下载的更新包后,3.7.7 可以正常运行,并显示新版本中的 GLM 5.3 模型,因此更新包本身没有明显损坏。
ZCode 版本 · ZCode version
3.5.3
设备 / 系统 / 浏览器 · Device / OS / Browser
TUXEDO INFINITYBOOK PRO / Arch Linux x86_64
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
当前安装:
ZCode: 3.5.3
OS: Arch Linux x86_64
Installation path: /opt/ZCode
Installation owner: root:root
当前 ZCode 可执行文件:
/opt/ZCode/zcode
对应的 desktop entry:
Exec="/opt/ZCode/zcode" %U
ZCode 的 updater configuration:
provider: generic
useMultipleRangeRequest: false
url: http://localhost:8081
updaterCacheDirName: '@zcodedesktop-updater'
更新包:
~/.cache/@zcodedesktop-updater/pending/ZCode-3.7.7-linux-x64.deb
/opt/ZCode 及其文件均由 root:root 所有,而 ZCode 本身是以普通用户运行的。
推测是更新下载阶段正常完成,但 Electron updater 在最终安装阶段无法替换 root-owned 的 /opt/ZCode,导致 Restart to update 没有实际完成安装。
我手动解压了 ZCode-3.7.7-linux-x64.deb,并使用 root 权限将其中的:
data/opt/ZCode
替换到:
/opt/ZCode
替换后,直接运行:
/opt/ZCode/zcode
可以正常启动 3.7.7。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Electron updater configuration and the Linux electron-updater path used by quitAndInstall/restart. Reproduce the update with the .deb in ~/.cache/@zcodedesktop-updater/pending/ and the root-owned /opt/ZCode installation. Done means Restart to update replaces /opt/ZCode, launches 3.7.7, and no longer offers the same update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, electron
- Domain
- desktop, operating-systems, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100