Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Oct 30, 2025

  1. Added override_dh_makeshlibs target to generate versioned shlibs file
  2. Set minimum dependency version to match major.minor.patch components
    of current package version
  3. This ensures proper version tracking and dependency management for
    shared libraries

Influence:

  1. Verify that package builds successfully with the new shlibs override
  2. Check that generated shlibs file contains correct version dependency
  3. Test package installation and dependency resolution on target systems
  4. Verify that dependent packages can properly link against the
    versioned library

fix: 为 libdtk6declarative 共享库添加版本化依赖

  1. 添加 override_dh_makeshlibs 目标来生成版本化的 shlibs 文件
  2. 设置最小依赖版本以匹配当前包版本的主版本.次版本.修订号组件
  3. 这确保了共享库的正确版本跟踪和依赖管理

Influence:

  1. 验证包是否使用新的 shlibs 覆盖成功构建
  2. 检查生成的 shlibs 文件是否包含正确的版本依赖
  3. 在目标系统上测试包安装和依赖解析
  4. 验证依赖包能否正确链接到版本化库

Summary by Sourcery

Generate versioned shlibs and enforce matching minimum dependencies for libdtk6declarative packaging to ensure proper version tracking and downstream linking.

Bug Fixes:

  • Add override_dh_makeshlibs target to generate versioned shlibs file
  • Set minimum shlibs dependency version to match the current package version

1. Added override_dh_makeshlibs target to generate versioned shlibs file
2. Set minimum dependency version to match major.minor.patch components
of current package version
3. This ensures proper version tracking and dependency management for
shared libraries

Influence:
1. Verify that package builds successfully with the new shlibs override
2. Check that generated shlibs file contains correct version dependency
3. Test package installation and dependency resolution on target systems
4. Verify that dependent packages can properly link against the
versioned library

fix: 为 libdtk6declarative 共享库添加版本化依赖

1. 添加 override_dh_makeshlibs 目标来生成版本化的 shlibs 文件
2. 设置最小依赖版本以匹配当前包版本的主版本.次版本.修订号组件
3. 这确保了共享库的正确版本跟踪和依赖管理

Influence:
1. 验证包是否使用新的 shlibs 覆盖成功构建
2. 检查生成的 shlibs 文件是否包含正确的版本依赖
3. 在目标系统上测试包安装和依赖解析
4. 验证依赖包能否正确链接到版本化库
@18202781743 18202781743 requested review from BLumia and mhduiy October 30, 2025 12:28
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/rules

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 30, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This update enhances Debian packaging for libdtk6declarative by overriding dh_makeshlibs to emit a versioned shlibs file and aligning the minimum shlib dependency with the package’s exact major.minor.patch version, ensuring accurate library version tracking and dependency resolution.

File-Level Changes

Change Details Files
Override dh_makeshlibs to produce a versioned shlibs file
  • Add override_dh_makeshlibs target in debian/rules
  • Invoke dh_makeshlibs with full package version for shlibs generation
debian/rules
Enforce minimum dependency version matching full package version
  • Extract major.minor.patch from the current package version
  • Pass the extracted version to shlib dependency generation
debian/rules

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

我来对这个 debian/rules 文件的变更进行审查:

  1. 语法逻辑分析:
  • 新增的 override_dh_makeshlibs 规则语法正确
  • 使用了 shell 命令替换来获取版本号,语法符合规范
  • cut 命令的参数使用正确,用于提取版本号的前三个部分
  1. 代码质量:
  • 代码结构清晰,遵循了 debian/rules 的标准格式
  • 使用了 override 机制来定制 dh_makeshlibs 的行为,这是正确的做法
  • 版本号的处理逻辑合理,确保了依赖关系的正确性
  1. 性能考虑:
  • 使用了简单的 shell 命令处理版本号,性能开销很小
  • 没有引入不必要的复杂性
  1. 安全性:
  • 代码中没有直接使用用户输入,不存在注入风险
  • 版本号处理使用的是系统变量,安全性可控

改进建议:

  1. 版本号处理的一致性:
  • 注意到之前已经定义了 BUILD_VER 变量处理版本号,建议复用这个逻辑,避免重复处理
  • 可以考虑将版本号提取逻辑统一到一个变量中
  1. 错误处理:
  • 建议添加错误处理,以防版本号格式不符合预期
  • 可以添加检查确保 VERSION 变量已设置
  1. 可维护性:
  • 建议添加注释说明这个规则的用途
  • 版本号提取逻辑可以提取为函数,提高代码复用性

修改建议示例:

# 提取版本号的主版本号
MAJOR_VER = $(shell echo $(VERSION) | cut -d '.' -f 1,2,3)

override_dh_makeshlibs:
	dh_makeshlibs -V "libdtk6declarative (>= $(MAJOR_VER))"

这样的修改:

  1. 提高了代码的可读性
  2. 避免了重复的版本号处理逻辑
  3. 使版本号处理更加统一和可维护
  4. 减少了潜在的错误可能性

总体来说,原始代码的功能实现是正确的,但可以通过上述改进提高代码质量和可维护性。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743 18202781743 merged commit 9a0c493 into linuxdeepin:master Oct 30, 2025
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants