Skip to content

fix(debian): avoid restarting treeland on upgrade#929

Merged
zccrs merged 1 commit into
linuxdeepin:masterfrom
wineee:deb
Jun 3, 2026
Merged

fix(debian): avoid restarting treeland on upgrade#929
zccrs merged 1 commit into
linuxdeepin:masterfrom
wineee:deb

Conversation

@wineee
Copy link
Copy Markdown
Member

@wineee wineee commented Jun 3, 2026

treeland.service is managed by DDM at runtime, but the package installs it as a systemd system unit. With the default dh_installsystemd behavior, debhelper generates maintainer script snippets that can start or restart the unit during package install and upgrade. That makes upgrading the treeland package disrupt the active compositor/greeter session.

Override dh_installsystemd with --no-start and --no-stop-on-upgrade so package operations do not change the running treeland.service state. DDM remains responsible for explicitly starting and stopping the compositor.

Also add the missing ${misc:Depends} substitutions and normalize the treeland-dev dependency formatting so debhelper-generated dependencies are preserved in the binary package metadata.

PMS: 364327

Summary by Sourcery

Adjust Debian packaging for treeland to avoid systemd-managed restarts during package install and upgrade and preserve debhelper-generated dependencies in metadata.

Bug Fixes:

  • Prevent treeland.service from being automatically started or restarted by systemd maintainer scripts during package installation or upgrade, avoiding disruption of active sessions.

Build:

  • Override dh_installsystemd with flags to avoid starting or stopping treeland.service during package operations.
  • Add missing ${misc:Depends} substitution and normalize treeland-dev dependency formatting so debhelper-generated dependencies are retained.

treeland.service is managed by DDM at runtime, but the package installs it as a systemd system unit. With the default dh_installsystemd behavior, debhelper generates maintainer script snippets that can start or restart the unit during package install and upgrade. That makes upgrading the treeland package disrupt the active compositor/greeter session.

Override dh_installsystemd with --no-start and --no-stop-on-upgrade so package operations do not change the running treeland.service state. DDM remains responsible for explicitly starting and stopping the compositor.

Also add the missing ${misc:Depends} substitutions and normalize the treeland-dev dependency formatting so debhelper-generated dependencies are preserved in the binary package metadata.

PMS: 364327
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 3, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts Debian packaging so treeland.service is not automatically started or restarted during install/upgrade, and cleans up debhelper-related dependencies and formatting in debian/control.

File-Level Changes

Change Details Files
Prevent dpkg/debhelper from starting or restarting treeland.service during install and upgrade so DDM remains the sole runtime controller.
  • Override the default dh_installsystemd behavior in debian/rules to pass --no-start so the unit is not auto-started on install
  • Add --no-stop-on-upgrade to the dh_installsystemd invocation so upgrades do not stop/restart the running treeland.service
  • Ensure the service remains installed as a systemd unit but its lifecycle is managed exclusively by DDM
debian/rules
Fix debhelper substitution dependencies and normalize package dependency formatting for treeland-dev.
  • Add the missing ${misc:Depends} substitution so debhelper-generated misc dependencies are kept in the binary package metadata
  • Normalize the Depends field formatting for treeland-dev to the preferred multi-line or canonical style without changing semantics, ensuring compatibility with debhelper
  • Perform minor control file cleanup consistent with Debian policy and packaging practices
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 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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Groveer, wineee, zccrs

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

@zccrs zccrs merged commit dec673b into linuxdeepin:master Jun 3, 2026
9 checks passed
@wineee wineee deleted the deb branch June 4, 2026 02:30
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