You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d045cb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(language_support): batch package queries per call
1. Replace the per-package dpkg-query and apt-cache processes with one dpkg
status snapshot and one apt-cache policy batch per public call, because
apt-cache loads the whole package cache and applies the pins on every
start, which took seconds per candidate package.
2. Keep the snapshot local to the call, so an installation or an apt update
is visible to the next query instead of returning stale results.
3. Mark name:arch entries as their plain name too and accept only the
installed status, so a package installed for one architecture is no
longer reported as missing.
4. Force LC_ALL=C for apt-cache, otherwise a translated apt prints localized
field names and no candidate version can be parsed.
5. Bound each command with a context timeout, so a stalled tool cannot block
the query forever.
6. Give each tool its own command function with a literal binary path, so the
program to run is never taken from a variable.
7. Add tests covering the batching, includeInstalled, the GNOME and
dictionary exclusions, query failures and the snapshot refresh.
Log: One language package query now runs a single dpkg-query and apt-cache.
Influence: Language package queries no longer time out.
fix(language_support): 语言包查询改为按调用批量执行
1. 不再逐包启动 dpkg-query 和 apt-cache,改为每次公开调用各执行一次 dpkg 状态读取和一次 apt-cache policy 批量查询;apt-cache 每次启动都要加载整个包缓存并计算 pin,单个候选包就要数秒。
2. 快照只在本次调用内有效,安装或 apt 更新后下一次查询即可看到新状态,不会返回过期结果。
3. name:arch 条目同时标记其原始包名,且只接受 installed 状态,某一架构已安装的包不再被判定为缺失。
4. apt-cache 强制使用 LC_ALL=C,否则翻译过的 apt 会输出本地化字段名,解析不到候选版本。
5. 每次调用加 context 超时,避免工具卡住时查询被无限期阻塞。
6. 两个工具各自使用独立的命令函数并写死二进制绝对路径,执行哪个程序不取自变量。
7. 补充测试,覆盖批量查询、includeInstalled、GNOME 与词典排除规则、查询失败以及快照刷新。
Log: 一次语言包查询现在只执行一次 dpkg-query 和一次 apt-cache。
PMS: BUG-379697
PMS: BUG-379687
PMS: BUG-379685
Influence: 语言包查询不再超时。
0 commit comments