Skip to content

fix: add libdde-shell-dev version constraints in package metadata#1582

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-debInstall
Apr 30, 2026
Merged

fix: add libdde-shell-dev version constraints in package metadata#1582
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-debInstall

Conversation

@wjyrich
Copy link
Copy Markdown
Contributor

@wjyrich wjyrich commented Apr 30, 2026

Add Breaks and Replaces entries for libdde-shell-dev (<< 2.0.39) to properly handle package conflicts and upgrades. This ensures that installations and updates do not break compatibility with older versions of the development headers.

Log: Added version constraints for libdde-shell-dev package

Influence:

  1. Test package installation with conflicting libdde-shell-dev versions
  2. Verify package upgrade from version < 2.0.39 to ensure proper replacement
  3. Test that package removal works correctly without leaving broken states
  4. Verify no regression in dde-clipboard dependency handling

fix: 在包元数据中添加 libdde-shell-dev 版本约束

为 libdde-shell-dev (<< 2.0.39) 添加 Breaks 和 Replaces 条目,以正确处理 包冲突和升级。这确保了安装和更新不会破坏与旧版本开发头文件的兼容性。

Log: 添加了 libdde-shell-dev 包的版本约束

Influence:

  1. 测试当前在冲突 libdde-shell-dev 版本时的包安装
  2. 验证从 2.0.39 以下版本升级的包替换过程
  3. 测试包移除操作是否正常工作,不留下损坏状态
  4. 验证 dde-clipboard 依赖处理无回归

PMS: TASK-389059

Summary by Sourcery

Build:

  • Update Debian package metadata to declare Breaks and Replaces for libdde-shell-dev versions earlier than 2.0.39.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 30, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Add Debian package metadata constraints so this package declares Breaks/Replaces on libdde-shell-dev (<< 2.0.39) to avoid conflicts and ensure clean upgrades/removals, particularly around dde-clipboard headers and dev files.

File-Level Changes

Change Details Files
Declare versioned Breaks/Replaces relationships against older libdde-shell-dev to fix upgrade and conflict handling.
  • Add a Breaks entry targeting libdde-shell-dev with version constraint (<< 2.0.39) so dpkg prevents co-installation with incompatible older dev headers
  • Add a matching Replaces entry for libdde-shell-dev (<< 2.0.39) so files can be taken over cleanly during upgrades
  • Associate the new Breaks/Replaces fields with the appropriate binary package stanza (likely the one providing or using dde-clipboard dev files) in the debian/control metadata
debian/control

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
Copy Markdown

@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:

  • Double-check that Breaks/Replaces are added to the specific binary package stanza that actually ships the conflicting headers/files, rather than to the source or an unrelated binary package.
  • If the conflicting libdde-shell-dev versions cannot be co-installed at all (not just during upgrades), consider whether a versioned Conflicts relationship would more accurately express the incompatibility than Breaks alone.
  • Confirm that the 2.0.39 version threshold matches the exact release where the header/ABI change occurred, so the versioned Breaks/Replaces do not unintentionally block compatible earlier versions or allow incompatible ones.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Double-check that Breaks/Replaces are added to the specific binary package stanza that actually ships the conflicting headers/files, rather than to the source or an unrelated binary package.
- If the conflicting libdde-shell-dev versions cannot be co-installed at all (not just during upgrades), consider whether a versioned Conflicts relationship would more accurately express the incompatibility than Breaks alone.
- Confirm that the 2.0.39 version threshold matches the exact release where the header/ABI change occurred, so the versioned Breaks/Replaces do not unintentionally block compatible earlier versions or allow incompatible ones.

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.

18202781743
18202781743 previously approved these changes Apr 30, 2026
1. Added Breaks field to debian/control for dde-shell (<< 2.0.39)
2. This ensures compatibility by preventing installation of incompatible
older versions of dde-shell
3. The Breaks directive enforces dependency resolution during package
updates

Log: N/A (infrastructure change, no user-facing impact)

Influence:
1. Verify package installation succeeds with dde-shell >= 2.0.39
2. Confirm installation is blocked with dde-shell < 2.0.39

chore: 添加与旧版本 dde-shell 的 Breaks 关系

1. 在 debian/control 中添加 dde-shell (<< 2.0.39) 的 Breaks 字段
2. 确保兼容性,防止安装不兼容的旧版本 dde-shell
3. Breaks 指令在软件包更新期间强制执行依赖关系解析

Log: 无(基础设施变更,无用户可见影响)

Influence:
1. 验证安装了 dde-shell >= 2.0.39 时软件包安装成功
2. 确认安装了 dde-shell < 2.0.39 时安装被阻止
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

这段代码是一个针对 Debian 软件包控制文件(debian/control)的补丁(diff)。它主要是在一个软件包的定义中添加了 Breaks 字段。

以下是对该补丁的详细审查和改进意见:

1. 语法逻辑审查

  • 语法正确性:语法是正确的。在 debian/control 文件中,Breaks 是一个标准的二进制包控制字段,用于声明当前包会破坏哪些特定版本的旧包。
  • 逻辑正确性
    • Breaks: dde-shell (<< 2.0.39) 的含义是:如果系统上安装的 dde-shell 版本严格小于 2.0.39,则当前包不能被安装,或者安装当前包会导致 dde-shell 无法正常工作。
    • 这通常意味着当前包(假设是 dde-shell-dev 或类似开发库)引入了与旧版 dde-shell 不兼容的更改(如 API 变更、文件路径冲突等)。
    • 潜在问题:通常开发包(-dev)破坏运行时包(dde-shell)的情况比较少见。通常是运行时包破坏旧的运行时包,或者开发包破坏旧的开发包。如果这个包是 dde-shell 的开发库,它声称会破坏主程序 dde-shell,这需要确认是否真的存在文件冲突(例如安装了同名但内容不同的文件)。如果仅仅是 API 不兼容,通常不需要 Breaks,除非两个包会安装同名文件。

2. 代码质量审查

  • 版本号精度:版本号 2.0.39 看起来是一个具体的版本号。这很好,表明开发者确切知道从哪个版本开始不兼容。
  • 依赖关系完整性
    • 添加了 Breaks 后,通常建议检查是否需要配合 Replaces 字段。如果当前包包含的文件是用来替代旧包中的文件的,必须添加 Replaces,否则包管理器(如 apt)会报文件冲突错误。
    • 如果仅仅是 API 变更导致二进制不兼容,而不涉及文件覆盖,则不需要 Replaces
  • 字段位置:在 Depends 之后添加 Breaks 是符合 Debian 控制字段常见排序习惯的(依赖关系通常在一起)。

3. 代码性能审查

  • 不适用debian/control 是元数据配置文件,不涉及运行时代码,因此不存在运行时性能问题。
  • 解析性能:多加一个字段对包管理器的解析性能影响微乎其微,可以忽略。

4. 代码安全审查

  • 版本回退风险Breaks 字段强制要求用户升级 dde-shell 到 2.0.39 或更高版本才能安装当前包。这防止了因版本不匹配导致的系统崩溃或库链接错误,从系统稳定性角度看是安全的。
  • 强制升级:这可能会导致用户在升级该开发包时,被迫升级整个桌面环境组件(dde-shell)。需要确保 2.0.39 版本在所有相关的软件源中都是可用的,否则会导致依赖无法满足。

改进建议

  1. 确认是否需要 Replaces

    • 请检查当前包是否包含与旧版 dde-shell 同名的文件(如配置文件、库文件等)。
    • 如果有同名文件且内容已更新,必须添加 Replaces 字段,否则安装过程会报错。
    • 建议修改为:
      +Breaks:
      + dde-shell (<< 2.0.39),
      +Replaces:
      + dde-shell (<< 2.0.39),
  2. 确认破坏范围

    • 确认是否真的需要破坏主程序 dde-shell。如果这是一个开发包(如 dde-shell-dev),它通常只提供头文件和链接库。如果它不向系统目录安装任何与主包冲突的文件,那么添加 Breaks 可能是不必要的,除非有特殊的架构设计导致它们不能共存。
    • 如果只是开发库不兼容旧运行时库,通常不需要 Breaks,因为编译时链接才会报错,不会破坏已安装的系统。
  3. 多行格式(可选)

    • 如果未来需要添加更多的破坏关系,现在的格式已经支持逗号分隔,符合规范,无需改动。

总结

这段代码在语法上是正确的。主要的改进点在于确认是否需要配合 Replaces 字段,以及再次确认开发库是否有必要破坏运行时库。如果确实存在文件冲突,请务必加上 Replaces

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@wjyrich
Copy link
Copy Markdown
Contributor Author

wjyrich commented Apr 30, 2026

/forcemerge

@deepin-bot
Copy link
Copy Markdown

deepin-bot Bot commented Apr 30, 2026

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 7cec945 into linuxdeepin:master Apr 30, 2026
9 of 12 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.

4 participants