feat(packaging): add delivery packages as recommends for Professional edition#429
Conversation
|
CLA Assistant Lite bot: |
3480c9b to
9f0cf94
Compare
deepin pr auto review你好!我是CodeGeeX。我已仔细审查了你提供的 Git Diff,本次修改主要涉及 Debian 打包规则( 以下是我从语法逻辑、代码质量、代码性能和代码安全四个维度提出的审查意见和改进建议: 1. 语法与逻辑
2. 代码质量
3. 代码性能
4. 代码安全
💡 综合改进建议代码针对上述问题,我为你优化了 # 提取配置文件路径和关键字为变量,增加可读性和可维护性
OS_VERSION_FILE := /etc/os-version
EDITION_KEY := EditionName=
COMMUNITY_EDITION := Community
# 增加文件存在性判断,避免文件不存在时 grep 报错或返回空值导致逻辑异常
ifneq ($(wildcard $(OS_VERSION_FILE)),)
EDITION := $(shell grep '^$(EDITION_KEY)' $(OS_VERSION_FILE) 2>/dev/null | cut -d= -f 2)
endif
depend_ostree = true
ifdef depend_ostree
DistDepends += ostree,
endif
# 仅在 EDITION 被成功获取且不等于 Community 时添加推荐依赖
ifneq ($(EDITION),$(COMMUNITY_EDITION))
ifdef EDITION
DistRecommends += uos-upgrade-delivery, uos-apt-delivery,
endif
endif
# ... 中间省略 ...
# 动态生成 dh_gencontrol 的参数,避免向 dpkg-gencontrol 传递空字符串
GENCONTROL_ARGS := $(if $(DistDepends),-Vdist:Depends="$(DistDepends)") $(if $(DistRecommends),-Vdist:Recommends="$(DistRecommends)")
override_dh_gencontrol:
dh_gencontrol -- $(GENCONTROL_ARGS)改动解释:
|
|
/integrate |
|
AutoIntegrationPr Bot |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: qiuzhiqian, Zeno-sole, zhaohuiw42 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 |
No description provided.