Skip to content

fix: 空值判断#348

Merged
max-lvs merged 1 commit into
linuxdeepin:release/eaglefrom
LiHua000:release/eagle
Jul 17, 2025
Merged

fix: 空值判断#348
max-lvs merged 1 commit into
linuxdeepin:release/eaglefrom
LiHua000:release/eagle

Conversation

@LiHua000

@LiHua000 LiHua000 commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

log: 修复因冲突包无法安装的问题

Summary by Sourcery

Bug Fixes:

  • Skip conflict checks when the conflict version string is empty to avoid installation failures due to unmet conflict requirements.

log: 修复因冲突包无法安装的问题
@sourcery-ai

sourcery-ai Bot commented Jul 17, 2025

Copy link
Copy Markdown

Reviewer's Guide

Updates conflict resolution logic to handle empty conflict versions, preventing installation failures when no conflict is specified.

Class diagram for updated PackagesManager::isConflictSatisfy logic

classDiagram
    class PackagesManager {
        +isConflictSatisfy(arch: QString, ...): ConflictResult
    }
    class Package {
        +compareVersion(installed_version, conflict_version)
    }
    PackagesManager --> Package: uses
Loading

File-Level Changes

Change Details Files
Handle empty conflict_version before version matching
  • Added conflict_version.isEmpty() check in the conflict satisfaction condition
  • Continued loop early when conflict_version is empty to bypass unnecessary version comparison
src/deb-installer/manager/packagesmanager.cpp

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

deepin pr auto review

关键摘要:

  • 在修改后的代码中,对conflict_version的检查增加了对空字符串的判断,这是一个好的做法,可以避免不必要的错误处理。

是否建议立即修改:

  • 否,当前的修改看起来是合理的,没有发现需要立即修改的问题。但是,建议进行进一步的代码审查以确保没有其他潜在的问题。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, max-lvs

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

@max-lvs max-lvs merged commit f271b06 into linuxdeepin:release/eagle Jul 17, 2025
15 of 17 checks passed
LiHua000 added a commit to LiHua000/deepin-deb-installer that referenced this pull request Sep 12, 2025
log: 修复因冲突包无法安装的问题
LiHua000 added a commit to LiHua000/deepin-deb-installer that referenced this pull request Sep 18, 2025
log: Add check for empty conflict_version in isConflictSatisfy to prevent installation failures when conflict version is missing
LiHua000 added a commit to LiHua000/deepin-deb-installer that referenced this pull request Dec 17, 2025
log: Add check for empty conflict_version in isConflictSatisfy to prevent installation failures when conflict version is missing
LiHua000 added a commit to LiHua000/deepin-deb-installer that referenced this pull request Dec 18, 2025
log: Add check for empty conflict_version in isConflictSatisfy to prevent installation failures when conflict version is missing
deepin-bot Bot pushed a commit that referenced this pull request Dec 18, 2025
log: Add check for empty conflict_version in isConflictSatisfy to prevent installation failures when conflict version is missing
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