Skip to content

LinuxWave 2.6.1

Choose a tag to compare

@Sha0huaZhang Sha0huaZhang released this 07 Oct 11:37
· 13 commits to main since this release

Release Note 更新日志

本次为缺陷修复发布:修掉 6 个真实缺陷,全部来自一份用户终端实录。

致谢

感谢 Stephen Zhang(@Robzhdev) 提供了一份完整的安装终端实录。
下面 6 项里有 5 项是照着实录复现出来的——没有那份记录,这些问题在开发机上很难被碰到,
因为它们的共同前提是「普通用户 + 网络不稳 + 共用安装」。

修了什么

1. sudo wave install 报「找不到命令」

sudo 用的是它自己那套 PATH,里面没有安装树的 bin / lib,所以 sudo wave …
必然失败——而安装器此前推荐的正是这条命令。现在共享安装的收尾提示与安装器的
共享安装说明都给出可直接复制的全路径写法:

sudo /home/linuxwave/.linuxwave/lib/wave install <package>

2. 写不进安装树时报原始 [Errno 13],而且要等到下载到一半才失败

在共用安装树下用普通账号装包,此前会先联网取版本、再下载、最后才在落盘时抛出一个
原始 [Errno 13] Permission denied: …,用户既看不出原因,也不知道该用什么命令。

现在在联网取版本之前就先检查下载目录与落盘目录能否写入,不能写就立刻停下,
并打印:树属于哪个账号、为什么写不进去、要执行哪条 sudo 全路径命令、以及
想让多个用户免 sudo 装包该看哪份文档。

3. Ctrl-C 打出一整段 Python traceback

下载卡住时按 Ctrl-C,此前会把调用栈整段喷出来。现在只有一行:

🌊 Interrupted. Nothing was installed.

退出码 130。另外,停在 Do you want to retry? [y/N] 提示上按 Ctrl-C,此前会被
当成「不想重试」而打印 Error: Failed to download package——把用户自己按的打断
说成下载失败;现在同样报成 interrupted。

4. 目录菜单输入无效时会静默换到别的目录

在安装目录菜单里输错内容,此前会静默回落到 ~/.local/linuxwave 并继续安装——
等于把东西装到了用户没选的位置。现在会明确报错,最多重试 3 次,然后退出(退出码 1),
绝不静默换目录。

5. 单个文件下载失败没有重试

实录里用户因为一个文件传输被重置,手工重跑了 8 次以上。现在 20 个程序文件里
任何一个失败都会自动重试,每个文件最多 5 次(退避等待,单次连接 20 秒、总时长 180 秒上限)。
重试提示始终打印——它解释了这次安装为什么变慢;--silent 只压掉逐文件的进度输出。

6. --silent 单独使用时仍会弹菜单

README 承诺 --silent 会自动应答目录菜单,但不带 --dir-option 时它其实仍会去读终端,
没有终端时就喷出 /dev/tty 的原始报错。现在它会明确选择默认项并说出来是哪一个:

🌊 --silent without --dir-option: using the default, $HOME/.local/linuxwave

升级路径已验证

当前版本 目标 行为
2.5.0 / 2.5.1 / 2.5.2 / 2.5.3 / 2.6.0 2.6.1 执行自更新 ✅
2.6.1 2.6.1 已是最新,短路退出

本次不涉及目录结构变更,已在 updatedata/2.6.1/dir_structure_change 里显式声明为 N,
因此自更新会跳过迁移步骤,不会搬动你的配置目录。

wave selfupdate

验证方式

这些改动都在隔离命名空间里跑过:影子 /etc、/home、/opt、/usr/local、/root、
/var、/srv,宿主的这些目录一个字节都不会被写。回归套件已从 82 条断言扩到 117 条,
覆盖安装目录、许可协议回滚、卸载确认语义、中途失败指引、下载重试、菜单校验、
--silent、共用安装的写入权限、Ctrl-C(下载中与重试提示两处)以及软链接回归。

其中「共用安装树不可写」用只读挂载真实复现;「Ctrl-C」用本地挂起代理与本地关闭端口
真实复现;修完还把旧代码临时打回去确认新断言确实会失败,避免写出永远通过的测试。

其他改动

  • 版本号 2.6.0 → 2.6.1,构建号 280H1920

Release Notes

A defect-fix release: 6 real bugs, all reproduced from a user's terminal transcript.

Credit

Thanks to Stephen Zhang (@Robzhdev) for sending a complete
transcript of an install session. 5 of the 6 items below came straight out of it - they are
hard to hit on a development machine, because they all need the same combination of an
ordinary user, an unreliable network and a shared install.

What was fixed

1. sudo wave install said "command not found"

sudo searches its own PATH, which does not contain the install tree's bin / lib,
so sudo wave … cannot work - and that was the command the installer recommended.
The shared-install summary and the installer's shared-install notes now give the
copy-pasteable form:

sudo /home/linuxwave/.linuxwave/lib/wave install <package>

2. An unwritable install tree reported a raw [Errno 13], and only after downloading

Installing as a normal user into a shared tree used to fetch version info, download the
package, and only then fail while writing, with a bare [Errno 13] Permission denied: ….
The user could see neither the cause nor the command that would work.

The installer now checks that the download and install directories are writable
before going online for version info, and stops immediately with: who owns the tree,
why it is not writable, the exact sudo command to run, and a pointer to the
shared-write group documentation.

3. Ctrl-C printed a full Python traceback

Pressing Ctrl-C while a download stalled printed the whole call stack. It now prints
one line:

🌊 Interrupted. Nothing was installed.

and exits with code 130. Separately, pressing Ctrl-C at the Do you want to retry? [y/N]
prompt used to be read as "do not retry" and reported as
Error: Failed to download package - calling the user's own interrupt a download failure.
It is now reported as an interrupt too.

4. An invalid menu answer silently switched directories

A wrong answer at the directory menu used to fall back to ~/.local/linuxwave and carry on,
installing into a directory the user had not chosen. It now reports the error, retries up to
3 times, and then exits (code 1) - never silently choosing another directory.

5. A single failed file download was not retried

In the transcript the user re-ran the installer more than 8 times because one file's transfer
kept getting reset. Any of the 20 program files is now retried automatically, up to 5 times
each
(with a back-off pause, a 20-second connect timeout and a 180-second total cap).
The retry notice is always printed - it explains why the install is taking longer - while
--silent still suppresses the per-file progress output.

6. --silent on its own still opened the menu

The README promises that --silent answers the directory menu, but without --dir-option
it still tried to read a terminal and leaked a raw /dev/tty error when there was none.
It now picks the default explicitly and says which one it used:

🌊 --silent without --dir-option: using the default, $HOME/.local/linuxwave

Upgrade path verified

From To Behaviour
2.5.0 / 2.5.1 / 2.5.2 / 2.5.3 / 2.6.0 2.6.1 self-update runs ✅
2.6.1 2.6.1 already up to date, exits early

No directory structure change is involved - updatedata/2.6.1/dir_structure_change
states N explicitly - so the self-update skips the migration step and will not move
your config directory.

wave selfupdate

How this was verified

Everything ran inside an isolated namespace with shadow copies of /etc, /home, /opt,
/usr/local, /root, /var and /srv; not one byte of the host's copies is written.
The regression suite grew from 82 to 117 assertions, covering install directories, the
licence-agreement rollback, uninstall confirmations, mid-install failure guidance, download
retries, menu validation, --silent, write permission on a shared tree, Ctrl-C (both while
downloading and at the retry prompt), and the symlink regression.

"Unwritable shared tree" is reproduced with a real read-only mount; Ctrl-C with a local
hanging proxy and a local closed port. After fixing, the old code was temporarily put back to
confirm the new assertions do fail - so the tests are not ones that can never fail.

Other Changes

  • Version 2.6.0 → 2.6.1, build number 280H1920

安装

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/LinuxWaveOrg/LinuxWave/HEAD/lib/install.sh)"

Install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/LinuxWaveOrg/LinuxWave/HEAD/lib/install.sh)"