Repository navigation
fix(packaging): ship env.exe in the default edition (Refs #1622) - #1627
Merged
Merged
Conversation
Member
Author
队长复核:PASS(可合入)头 16c653f(2 提交:17c1e0e7 修法 + 16c653f 注释-only),基底 68d2917 = live tip,交集 ∅。 已核实(队长一手核过腿日志与 CI):
合入注记:正文 UNVERIFIED-BY-CAPTAIN 一节作废,合入体按 #3524 前例换已核实腿结果(PR 正文不改);Refs #1622,合入后由队长手动关闭 #1622;与 #1628 零共享文件,可任意顺序合入。N1(非阻塞):新钉无 edition guard,若 ctest 日后在 full-edition job 开启,六个 EXPECT_FALSE 按设计失败——合入后另记一笔。 |
caomengxuan666
marked this pull request as ready for review
November 14, 2026 06:45
caomengxuan666
added a commit
that referenced
this pull request
Nov 14, 2026
…historical snapshot (#1629) The checkpoint section records the acceptance state as audited by the lead review: current main had 50 commands wired (not the historical 76/42 numbers), A1/tail/ABI-v3 are not accepted yet, I18N is an acceptance prerequisite, and the safety record for preserve-root (chmod/chgrp/chown) blocks wiring until the listed gates pass. Captain addendum records same-day movement: #1627 merged, PRs #1624/#1625/#1626/#1628 open, and the fix/batch-1595-1616-1617 trio.
This was referenced Nov 17, 2026
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.
根因
niubash #1002:分发的 niugit 捆绑里没有
env.exe,#!/usr/bin/env bash的git hook 全部无法 spawn(
no 'env' found on PATH)。断点不在 niubash 打包面,而在 WinuxCmd 默认版的分发清单:
src/core/dispatcher.cppm的kFullOnlyCommandNames把env列为 full-only命令,
wpm links rebuild在默认版跳过它(src/commands/wpm.cpp:728),link_sweep_names()/retire_edition_links也按同一清单清理它,所以默认版永远不产出
usr/bin/env.exe。这是误归类:其余六个(
[、test、true、false、kill、time)确为 bash内建/保留字(test.def:23,105;colon.def:35,44;kill.def:23;parse.y:2374),
而
env不是内建——bash-5.3 的builtins/*.def里没有$BUILTIN env(GNU coreutils 的
env是外部命令;rubash #3451 同样确认 GNU 无 env.def)。修法
src/core/dispatcher.cppm:kFullOnlyCommandNames7 → 6,删"env",并在 1.2.0 打包:默认版剥离 7 个宿主语义命令名 + full 版分版(正名/wpm 口径定版) #1438 注释里留一行说明(env 不在清单的理由)。
command_names()、link_sweep_names()、retire_edition_links都读这一份清单,无需他改。tests/unit/wpm/wpm_unit_test.cpp:wpm_links_rebuild_creates_env_hardlink_in_default_edition——默认版wpm links rebuild后usr/bin/env.exe存在且与winuxcmd.exe同 inode,其余六个 full-only 链接仍不存在。
验收
wpm links rebuild:created 计数 +1,usr/bin/env.exe存在且与winuxcmd.exe同 inode,其余 6 个仍不存在。env启动#!脚本仍失败(Permission denied / 126)是 WinuxCmd [bug] env 启动 #! 脚本失败(Permission denied/126):未接入 execvp 形 childproc 解析,#!/usr/bin/env 的 git hook 依赖它(niubash#1002) #1623,另开 PR 修
src/utils/childproc.cppm的 shebang 解析;niubash 侧 pin bump + 发版烟囱断言待含 [packaging] 默认版剥离 env 入口链接是误归类:env 不是 bash 内建,#!/usr/bin/env 的 git hook 无 env.exe 可用(niubash#1002) #1622+[bug] env 启动 #! 脚本失败(Permission denied/126):未接入 execvp 形 childproc 解析,#!/usr/bin/env 的 git hook 依赖它(niubash#1002) #1623 的 WinuxCmd 发版后做(niu [gap] factor: 0 and 1 are printed with themselves as factors #1002)。
本 PR 删除了什么
kFullOnlyCommandNames删"env"一个条目;retire_edition_links不再清理既有安装里的env.exe(该链接从此为默认版正常产物)。
UNVERIFIED-BY-CAPTAIN