chore(debian): remove unneeded fonts-noto-cjk runtime dependency - #199
Open
Ivy233 wants to merge 1 commit into
Open
chore(debian): remove unneeded fonts-noto-cjk runtime dependency#199Ivy233 wants to merge 1 commit into
Ivy233 wants to merge 1 commit into
Conversation
- The dependency was introduced in 2018 along with adjust-grub-theme, whose GRUB themes then used "Noto Sans CJK SC" for menu text, resolved via fc-match and rendered with grub-mkfont - Since the V25 theme migration, the active deepin/deepin-fallback themes use Unifont only and ship a pre-generated unifont-regular-16.pf2, so no runtime font generation is needed anymore - The Noto-based v20 theme path (adjustThemeNormalV20) is dead code now, and the font-generation code (findFont/genPF2Font) has already been eliminated by the linker in released binaries - No other dde-api binary renders text, and language_support installs fonts-noto-cjk on demand via pkg_depends when adding ja/ko/zh locales --- chore(debian): 移除不再需要的 fonts-noto-cjk 运行时依赖 - 该依赖于 2018 年随 adjust-grub-theme 一并引入,当时 GRUB 主题的菜单文字 使用 "Noto Sans CJK SC" 字体,需通过 fc-match 查找字体文件并用 grub-mkfont 生成 pf2 字体 - V25 主题迁移后,当前生效的 deepin/deepin-fallback 主题仅使用 Unifont 字体,且自带预生成的 unifont-regular-16.pf2,运行时不再需要生成字体 - 基于 Noto 字体的 v20 主题路径(adjustThemeNormalV20)已成为死代码,字体 生成相关代码(findFont/genPF2Font)在已发布的二进制中已被链接器消除 - 其余二进制均不进行文本渲染;language_support 在添加 ja/ko/zh 语言时会 通过 pkg_depends 按需安装 fonts-noto-cjk Log: 移除 dde-api 不再需要的 fonts-noto-cjk 运行时依赖 Influence: 打包依赖,不影响运行时功能 PMS: TASK-394379
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves the unnecessary fonts-noto-cjk runtime dependency from the dde-api package in debian/control, keeping only the dependencies actually required at runtime. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/debian/control
+++ b/debian/control
@@ -48,7 +48,6 @@ Depends:
blur-effect,
coreutils(>=8.30),
fontconfig,
- fonts-noto-cjk,
libcanberra-pulse,
locales,
rfkill, |
Contributor
|
TAG Bot New tag: 6.0.47 |
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.
Summary
Remove
fonts-noto-cjkfrom thedde-apiruntime Depends indebian/control. It is a historical leftover: no code path in current dde-api uses Noto CJK fonts anymore, so the hard dependency is unnecessary.原因分析 / Why it is no longer needed
1. 依赖的来源(2018)
fonts-noto-cjk是 2018 年随adjust-grub-theme引入的(commit 69b1ee7,同批还加入了fonts-noto-mono)。当时 GRUB 主题的菜单/标签字体是Noto Sans CJK SC,需要运行时通过fc-match查找字体文件、再用grub-mkfont生成 pf2 字体,因此需要硬依赖该字体包。2. 后续演进
fonts-noto-mono依赖随之被 unifont 替换,但菜单字体仍是 Noto Sans CJK SC,故fonts-noto-cjk保留。deepin主题被替换为基于 fallback 的新主题,仅使用 Unifont 字体,且直接附带预生成的unifont-regular-16.pf2(由copyThemeFiles复制,运行时不再生成字体);使用 Noto 的旧主题被迁移到deepin-v20目录。3. 当前代码状态
adjustTheme()只调用adjustThemeFallback()和adjustThemeNormalV25(),两者均不做任何字体生成;使用 Noto 字体的adjustThemeNormalV20()是死代码(仅测试调用)。findFont/genPF2Font(调用fc-match/grub-mkfont)只被上述死代码路径引用,在已发布二进制中已被 Go 链接器消除。deepin/deepin-fallback主题模板仅引用Unifont Regular(由已存在的依赖fonts-unifont提供)。language_support的pkg_depends机制本就是在添加 ja/ko/zh 语言时按需安装fonts-noto-cjk,这是设计上的正确途径,无需硬依赖。验证 / Verification
已在 deepin V25.2.1(dde-api 6.0.45.0)实机确认:
/usr/lib/deepin-api/adjust-grub-theme(VERSION 20)二进制中不含grub-mkfont、fc-match、Noto Sans CJK SC、deepin-v20任何字符串 —— 链接器死代码消除证实 Noto 路径在生产二进制中不可达deepin/deepin-fallback仅引用 Unifont,且附带预生成 pf2/etc/default/grub.d/11_dde.cfg显示 V25 主题正常在用(GRUB_THEME=/boot/grub/themes/deepin/theme.txt)风险评估 / Risk assessment
deepin-desktop-environment-core硬依赖fonts-noto-cjk,标准系统上该字体无论如何都会安装,此改动仅为打包元数据的准确性修正。adjustThemeNormalV20/v20 主题,届时把依赖加回即可。Related
PMS: TASK-394379
Summary by Sourcery
Enhancements:
fonts-noto-cjkruntime dependency fromdde-apipackaging metadata.