Skip to content

Commit 1c08e2f

Browse files
committed
docs(libgbm): record the final state — the follow-up in 16.4 is done
Section 16 said the constructor could not be deleted until #713 merged. It has, so 16.3 is marked stale and a new section 18 records what the package actually ended up as: 598 lines to 303, with the constructor, the backend farm, mesa_libdir() and mcpp_gbm.h all gone. Also records what the two test binaries now guard, which is the part worth knowing: their assertions point OUTSIDE this repository -- at xim-pkgindex's DISCOVERY row, at xim:mesa still placing its backends, and at mcpp still injecting subos env. The member stopped being a self-test and became the ecosystem's tripwire. Verification in 18.2 is against the PUBLISHED artifact (xlings update), not a locally patched index copy, which is the distinction section 12.6 warns about.
1 parent 90a4a84 commit 1c08e2f

1 file changed

Lines changed: 59 additions & 1 deletion

File tree

.agents/docs/2026-08-30-gbm-cross-repo-closed-loop-plan.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ constructor 这一步是空转。
970970
对比同一个包在**未打补丁**的索引下(本文档 §12.4 之前的所有测量),同一条路径给出的是
971971
包内 farm 的值 —— 差别只有一个变量:索引里有没有那一行 DISCOVERY。
972972

973-
### 16.3 为什么现在还不能删
973+
### 16.3 为什么现在还不能删 —— ⚠ 已过时,#713 已合并,constructor 已删除(见 §18)
974974

975975
`#713` 尚未合并,artifact 也没重新发布。删了之后:
976976

@@ -1055,3 +1055,61 @@ graphics.declare_vulkan_icd(dir, "share/vulkan/icd.d", tag)
10551055

10561056
所以下一步是 **vulkan-runtime**,不是 libdrm。这与本方案的主线是同一条:
10571057
**先问「生态是不是已经拥有它」,再决定是 vendor、绑定、还是够宿主。**
1058+
1059+
1060+
---
1061+
1062+
## 18. 最终状态(2026-08-30,#713 合并之后)
1063+
1064+
§16.4 列的那一步已经做完了。
1065+
1066+
### 18.1 包最终长什么样
1067+
1068+
| | 行数 |
1069+
|---|---|
1070+
| 带 constructor 的形态 | 598 |
1071+
| **最终** | **303** |
1072+
1073+
删掉的:`gbm_backends.c`(constructor + 两个 helper)、`lib/gbm/` 后端 farm、
1074+
`mesa_libdir()``mcpp_gbm.h`,以及为它们辩护的那段注释。
1075+
1076+
剩下的就是一个绑定:`deps = { runtime = { "xim:mesa" } }`、一个把
1077+
`gbm.h``libgbm.so*` 从 subos view 软链出来的 `install()`,加上
1078+
`include_dirs` / `ldflags` / `runtime.{library_dirs,link_library_dirs}`
1079+
**它不编译任何上游源码、不带自己的头文件、不设任何环境变量。**
1080+
1081+
`GBM_BACKENDS_PATH` 从来就是 Mesa 自己的机制、而且是**环境**的职责;
1082+
包去做那件事的那个版本是权宜之计,不是设计。
1083+
1084+
### 18.2 验证(对着**已发布**的 artifact,不是本地打补丁的副本)
1085+
1086+
`xlings update` 从发布的 artifact 同步索引 → 重装 `xim:mesa``config()` 重跑:
1087+
1088+
```
1089+
mesa vars: ['LIBGL_DRIVERS_PATH', '__EGL_VENDOR_LIBRARY_DIRS', 'XDG_DATA_DIRS', 'GBM_BACKENDS_PATH']
1090+
<registry>/subos/default/usr/lib/gbm/dri_gbm.so
1091+
```
1092+
1093+
`mcpp test -p libgbm`(CN 镜像,冷跑):**2 passed**,且
1094+
1095+
```
1096+
backends dir: <registry>/subos/default/usr/lib/gbm ← subos 给的,不是包给的
1097+
```
1098+
1099+
### 18.3 测试现在守的是什么
1100+
1101+
两个二进制断言的对象**移到了本仓之外**,这是刻意的:
1102+
1103+
| 断言 | 一旦谁坏了会红 |
1104+
|---|---|
1105+
| `GBM_BACKENDS_PATH` 已设置 | xim-pkgindex 的 DISCOVERY 行被删 / mcpp 停止注入 subos env |
1106+
| 它指向的目录里有 `*_gbm.so` | `xim:mesa` 不再把后端放进 subos |
1107+
| `GBM_BO_FORMAT_XRGB8888`(值 0)→ `"XR24"` | 头与库来自不同 Mesa |
1108+
1109+
所以这个 member 现在是**整条生态链的绊线**,而不只是这个包的自测。
1110+
1111+
### 18.4 顺带修掉的一个更大的问题
1112+
1113+
`index.toml``min_mcpp = 2026.8.3.3`**假的**,而且是本包证明的 —— 详见提交
1114+
`feat(libgbm): the package sheds its workaround; index floor corrected`
1115+
已上调到 `2026.8.27.2`,同时把「floor 与 CI pin 一起动」这条早已漂移的不变量恢复了。

0 commit comments

Comments
 (0)