Skip to content

chore: prohibit the startup and auto start of some services#138

Merged
mhduiy merged 1 commit into
masterfrom
autostart
Jun 30, 2025
Merged

chore: prohibit the startup and auto start of some services#138
mhduiy merged 1 commit into
masterfrom
autostart

Conversation

@mhduiy
Copy link
Copy Markdown
Contributor

@mhduiy mhduiy commented Jun 26, 2025

The deepin-api-device, deepin-locale-helper, deepin-sound-theme-player can be started as needed.

Log: prohibit the startup and auto start of some services

Summary by Sourcery

Chores:

  • Disable startup and auto-start of deepin-api-device, deepin-locale-helper, and deepin-sound-theme-player in debian/rules

The deepin-api-device, deepin-locale-helper, deepin-sound-theme-player can be started as needed.

Log: prohibit the startup and auto start of some services
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 26, 2025

Reviewer's Guide

This PR modifies the Debian packaging rules to disable the automatic registration and startup of several deepin services (deepin-api-device, deepin-locale-helper, and deepin-sound-theme-player) while retaining the ability to launch them on demand.

File-Level Changes

Change Details Files
Prevent services from auto-registering and starting during package installation
  • Add an override for dh_installinit to skip init script handling
  • Remove deepin-api-device, deepin-locale-helper, and deepin-sound-theme-player from dh_installinit invocation
  • Adjust flags to ensure services remain installable but not enabled by default
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

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 @mhduiy - 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.

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

代码审查意见如下:

代码质量

  1. 注释风格:在添加注释时,建议使用统一的注释风格,例如使用 # 开头的单行注释,或者使用 /* */ 的多行注释。当前代码中混合使用了两种风格,建议统一。
  2. 命令重复dh_installsystemd 命令被多次调用,可以考虑将重复的命令合并,以提高代码的简洁性和可维护性。

代码性能

  1. 命令优化:如果 dh_installsystemd 命令的参数较多,可以考虑将它们合并为一个命令,减少系统调用的次数,从而提高性能。

代码安全

  1. 命令安全性:确保传递给 dh_installsystemd 的参数是安全的,避免潜在的注入攻击。如果参数来自用户输入,应该进行适当的验证和清理。

代码逻辑

  1. 逻辑清晰性:当前代码逻辑较为简单,没有明显的逻辑错误。但是,如果后续需要添加更多的服务,建议将服务名称和参数配置化,以便于管理和扩展。

具体修改建议

  1. 统一注释风格

    -	# 需要开机启动
    +	# 需要开机启动
    -	dh_installsystemd --no-start
    +	dh_installsystemd --name=deepin-login-sound --no-start
    +	dh_installsystemd --name=deepin-shutdown-sound --no-start
  2. 合并重复命令

    -	dh_installsystemd --name=deepin-api-device --no-enable --no-start
    -	dh_installsystemd --name=deepin-locale-helper --no-enable --no-start
    -	dh_installsystemd --name=deepin-sound-theme-player --no-enable --no-start
    +	dh_installsystemd --name=deepin-api-device,deepin-locale-helper,deepin-sound-theme-player --no-enable --no-start

通过以上修改,可以提高代码的可读性、可维护性和性能。

@mhduiy mhduiy requested a review from fly602 June 26, 2025 12:49
@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602, mhduiy

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

@mhduiy mhduiy merged commit 1afcaec into master Jun 30, 2025
28 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