stage-index: drop the wrapper nothing calls - #238
Merged
Conversation
`portage_restrict()` 只是 `portage_policy(overlay)[0]` 的一层包装,生产路径 没有任何呼叫点,只有一条测试透过它验证仓库路径解析不到时会 fail-closed。 移除包装,那条测试改为直接呼叫 `portage_policy()`,守的行为不变。 顺带清掉 `docs/dependency-closure.md` 里三处指向源码的行号锚点。行号在下一 次改动就失效,实测三处已经全部偏移,改成只指档案。
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.
仓库盘点找到的低风险清理,两项。
build/stage-index.py的portage_restrict()是portage_policy(overlay)[0]的一层包装,全仓库搜索只有定义与一条测试呼叫,生产路径没有呼叫点。移除包装,那条
测试改为直接呼叫
portage_policy()。docs/dependency-closure.md里三处#L<行号>锚点已经全部偏移:runtime_atoms写 111 实际 122、
runtime_closure写 172 实际 177、check写 201 实际 191。行号锚点在下一次改动就失效,改成只指档案。
测试
守的行为没变:把
MetadataUnavailable那条 fail-closed 拿掉之后tests/test-stage-index.py仍然转红(rc=1)。本机全套 Python、Shell、JavaScript测试、
check-copy、py_compile与check-commits通过。