Skip to content

Conversation

@LiHua000
Copy link

@LiHua000 LiHua000 commented Jan 29, 2026

Log:as title

Summary by Sourcery

Build:

  • Add an alternative debian/control.1 defining Qt5-specific build dependencies and package metadata for deepin-draw.

@github-actions
Copy link

  • 检测到debian目录文件有变更: debian/control.1,debian/control

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 29, 2026

Reviewer's Guide

Adds a separate Debian packaging control file defining a Qt5-based build configuration for deepin-draw, presumably to support V20, alongside the existing (Qt6/V25) packaging setup.

Flow diagram for selecting Qt5 vs Qt6 Debian control for builds

flowchart TD
  start["Start package build"]
  detect_version["Detect target UOS version"]
  v20_check{Is target V20?}
  use_control1["Use debian/control.1 (Qt5 config)"]
  use_control["Use debian/control (Qt6 config)"]
  build_qt5["Build deepin-draw with Qt5 dependencies"]
  build_qt6["Build deepin-draw with Qt6 dependencies"]
  end_node["deepin-draw .deb produced"]

  start --> detect_version --> v20_check
  v20_check -->|Yes| use_control1 --> build_qt5 --> end_node
  v20_check -->|No| use_control --> build_qt6 --> end_node
Loading

File-Level Changes

Change Details Files
Introduce an alternate Debian control file that defines a Qt5-based build configuration for the deepin-draw package.
  • Create debian/control.1 with source/package metadata for deepin-draw
  • Specify Qt5-related build dependencies (qtbase5-dev, qttools5-dev, qttools5-dev-tools, libqt5svg5-dev, libqt5opengl5-dev) and existing library/test dependencies
  • Define package stanza for deepin-draw including runtime dependencies, recommends, and basic description targeting the Qt5 build
debian/control.1

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

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 - I've left some high level feedback:

  • The new debian/control.1 largely duplicates typical control metadata; consider factoring shared fields/Build-Depends so Qt5/Qt6 variants don’t drift out of sync over time.
  • The Standards-Version is set to 3.9.8, which is quite old; verify whether a more recent Standards-Version should be used to match your target Debian/UOS tooling.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new debian/control.1 largely duplicates typical control metadata; consider factoring shared fields/Build-Depends so Qt5/Qt6 variants don’t drift out of sync over time.
- The Standards-Version is set to 3.9.8, which is quite old; verify whether a more recent Standards-Version should be used to match your target Debian/UOS tooling.

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.

@github-actions
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 24,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

@deepin-ci-robot
Copy link

deepin pr auto review

这份 git diff 展示了对 deepin-draw 项目的 debian/control 文件的修改,主要是将构建依赖和运行依赖从 "Qt5/DTK5 或 Qt6/DTK6" 的兼容模式强制切换为仅支持 "Qt6/DTK6" 版本。同时,diff 中还包含了一个新文件 debian/control.1,看起来是旧版(Qt5版本)的备份或残留。

以下是对该变更的详细审查意见,涵盖语法逻辑、代码质量、代码性能和代码安全四个方面:

1. 语法逻辑

  • 逻辑变更明确:修改的核心逻辑是移除了 | (OR) 依赖关系符。原逻辑允许包管理器在 Qt5 和 Qt6 系列库之间选择(通常选择系统中已安装的版本),新逻辑强制要求使用 Qt6 系列库。这在语法上是完全合法的 Debian 控制文件语法。
  • 一致性:在 Build-DependsDepends 字段中,所有相关的 Qt 和 DTK 库都被同步更新,保持了逻辑上的一致性。
  • 文件残留 (debian/control.1):diff 显示新增了一个 debian/control.1 文件。这通常是不应该被提交到版本控制中的临时文件或备份文件。它包含了旧版的 Qt5 依赖定义。如果这是为了保留旧版本配置,应该使用 Git 分支或标签,而不是在源码树中保留 .1 后缀的副本。

2. 代码质量

  • 依赖管理的清晰度:移除备选依赖(|)使得依赖关系更加单一和明确,减少了构建环境的不确定性。这对于持续集成(CI)和发布管理来说是一个改进,因为开发者可以确切知道代码是在哪个版本的框架上编译和运行的。
  • 潜在的兼容性风险:虽然代码质量在"确定性"上有所提升,但在"兼容性"上有所降低。如果目标发行版(如旧版本的 Debian 或 UOS)尚未完全迁移到 Qt6,或者用户系统中的 Qt6 环境不如 Qt5 稳定,这种强制切换可能会导致无法安装或运行。
  • 清理建议:建议删除 debian/control.1 文件,保持代码库的整洁。

3. 代码性能

  • 构建性能:依赖项的变更本身不会直接影响编译后二进制文件的运行性能。但是,Qt6 相比 Qt5 在渲染引擎和高分屏支持上通常有性能优化。如果项目代码已经适配了 Qt6 的新特性,那么这次依赖变更将允许程序利用 Qt6 的性能优势。
  • 安装体积:Qt6 和 DTK6 的库体积可能与 Qt5/DTK5 不同,但这属于包管理层面的考量,不属于代码层面的性能问题。

4. 代码安全

  • 供应链安全:更新到较新的库版本(Qt6/DTK6)通常意味着继承了上游最新的安全补丁。Qt5 已逐渐进入维护期,而 Qt6 是当前活跃开发的主线。因此,强制使用 Qt6 有助于提高软件的长期安全性。
  • 依赖完整性:审查中发现 libdtk6core-devlibdtk6core-bin 被正确添加,替代了旧的 5 系列。这确保了运行时库和开发包的版本匹配,避免了因版本混搭(如 dev 包是 v6 而 bin 包是 v5)可能导致的链接错误或运行时崩溃。

改进建议

  1. 删除临时文件
    请确认并删除 debian/control.1。这个文件看起来像是编辑时产生的备份,不应包含在提交中。

    git rm debian/control.1
  2. 检查 Standards-Version
    文件中的 Standards-Version: 3.9.8 是一个非常旧的版本(发布于 2011 年左右)。虽然这不影响构建,但作为现代 Debian 包,建议将其更新到当前最新的标准版本(例如 4.6.0 或更高),以确保符合最新的打包策略(如硬编码支持路径等)。

  3. 完善 Commit Message
    这次提交是一个破坏性变更(Breaking Change),因为它移除了对 Qt5 的支持。建议在提交信息中明确说明这一点,例如:

    "Drop Qt5 support, migrate build and runtime dependencies to Qt6/DTK6 exclusively."

  4. 验证构建环境
    由于移除了备选依赖,请确保 CI/CD 环境或官方构建仓库中已安装完整的 Qt6 和 DTK6 开发包,否则构建将会失败。

总结

这次修改在逻辑上正确,有助于统一技术栈到较新的 Qt6 版本,有利于长期维护和安全性。主要问题在于包含了不必要的临时文件 debian/control.1,以及 Standards-Version 过于陈旧。建议清理文件并更新标准版本号。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, lzwind

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

@LiHua000
Copy link
Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 29, 2026

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit b1e815e into linuxdeepin:develop/snipe Jan 29, 2026
17 of 18 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