Skip to content

Commit 91de938

Browse files
committed
docs(libgbm): the constructor's removal condition is now mechanical
The descriptor said the real fix 'is worth filing'. It is filed and implemented: openxlings/xim-pkgindex#713 puts GBM_BACKENDS_PATH in the graphics discovery table, so xim:mesa declares it into the subos and every consumer inherits it (measured: '4 env var(s) from 1 package(s)' where it was 3, and a real gbm_bo_create on card0). So the comment now names the removal CONDITION instead of an intention, and the condition is checkable rather than a judgement call: delete the TU, the lib/gbm farm and mcpp_gbm.h, re-run tests/stock_usage.cpp -- which includes stock <gbm.h> and nothing else -- and if it stays green the ecosystem is supplying the value. Also records that it is NOT green yet as of today: the value only arrives in a home whose installed xim:mesa was configured by an index carrying #713, i.e. after that PR merges and the artifact republishes. Verified again after the edit: parse OK, 2 passed via the CN mirror, cold.
1 parent fff0d75 commit 91de938

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

pkgs/c/compat.libgbm.lua

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,26 @@
156156
-- same variable, same "don't override an explicit value" rule, scoped to
157157
-- processes that actually link libgbm.
158158
--
159-
-- WHERE THIS REALLY BELONGS. Long term the distro answer is the right one and
160-
-- it is one layer down: `xim:mesa` either building with `-Dgbm-backends-path=`
161-
-- pointing into the subos view, or declaring `lib/gbm/` into it the way it
162-
-- already declares `lib` and `include`. Then this package would carry no
163-
-- constructor at all. Worth filing; until then the wiring lives here, where it
164-
-- can at least be tested.
159+
-- WHERE THIS REALLY BELONGS, AND WHEN THIS CODE GOES AWAY. The distro answer is
160+
-- the right one and it is one layer down. That is now DONE rather than
161+
-- proposed: openxlings/xim-pkgindex#713 adds `GBM_BACKENDS_PATH` to the
162+
-- graphics discovery table, so `xim:mesa` declares it into the subos and every
163+
-- consumer inherits it — measured in a fresh subos, `4 env var(s) from 1
164+
-- package(s)` where it used to be 3, and a real `gbm_bo_create` on card0.
165+
--
166+
-- THE REMOVAL CONDITION IS MECHANICAL, not a judgement call:
167+
-- `tests/stock_usage.cpp` includes stock `<gbm.h>` and nothing else and
168+
-- asserts the variable is already set. Delete this TU, the `lib/gbm/` farm and
169+
-- `mcpp_gbm.h`, and re-run it. If it stays green, the ecosystem is supplying
170+
-- the value and none of this is needed any more.
171+
--
172+
-- As of 2026-08-30 it is NOT yet green without the constructor: the value
173+
-- arrives only in a home whose installed `xim:mesa` was configured by an index
174+
-- carrying #713, which means after that PR merges and the artifact is
175+
-- republished. Until then this is the only thing that makes
176+
-- `gbm_create_device()` work for an mcpp consumer, and it is deliberately the
177+
-- narrowest possible mechanism — one constructor, one variable, no override of
178+
-- an explicit value.
165179
--
166180
-- WHY THE FARM CARRIES THE UNVERSIONED `libgbm.so`, when compat.vulkan-runtime
167181
-- is emphatic that its farm must hold versioned sonames only. That rule exists

0 commit comments

Comments
 (0)