Skip to content

Revert "chore: migrate linglong deps to declarative buildext.apt" - #643

Merged
pengfeixx merged 1 commit into
release/snipefrom
revert-642-chore/pick-buildext-apt
Oct 10, 2026
Merged

pengfeixx merged 1 commit into
release/snipefrom
revert-642-chore/pick-buildext-apt

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #642

Summary by Sourcery

Restore the previous script-based Linglong dependency workflow for building and packaging deepin-editor.

Enhancements:

  • Restore script-based dependency installation and deployment for Linglong builds.
  • Move dependency handling from declarative buildext.apt configuration back into the build process and generated install metadata.

Build:

  • Update the Linglong build configuration to download and install required packages during builds, then package runtime dependencies for the application.

Chores:

  • Revert the declarative Linglong dependency migration.

@sourcery-ai

sourcery-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Reverts declarative buildext.apt dependency migration by restoring script-driven dependency handling: APT packages are downloaded and installed into the build prefix, runtime libraries are discovered through explicit targets, and .install metadata is generated during the build.

Flow diagram for script-driven dependency packaging

flowchart TD
    A[Build starts] --> B[apt download-only dependency packages]
    B --> C[install_dep into PREFIX]
    C --> D[cmake configure and build]
    D --> E[cmake install with install.log]
    E --> F[deploy_dep scans explicit runtime targets]
    F --> G[Generate .install metadata]
Loading

File-Level Changes

Change Details Files
Replace declarative Linglong APT dependency resolution with explicit dependency download, installation, and deployment scripts.
  • Add scripts to install downloaded APT packages into the build prefix and generate runtime dependency manifests.
  • Download the full development dependency set during the build and invoke the new installation and deployment scripts.
  • Reduce declarative build dependencies to libc6 and remove runtime dependency declarations.
deploy_dep
install_dep
linglong.yaml
Adjust the build workflow to use dependencies installed into the prefix and capture installation output.
  • Remove the /runtime CMake prefix override.
  • Redirect the install target output to install.log.
  • Enumerate application and dynamically loaded libraries for deployment packaging.
linglong.yaml

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="linglong.yaml" line_range="23" />
<code_context>

 build: |
+  # 下载和安装依赖
+  apt -y install --download-only qt6-5compat-dev qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-base-private-dev qt6-svg-dev libdtk6widget-dev libdtk6gui-dev libdtk6core-dev libdtk6declarative-dev libpolkit-qt6-1-dev libkf6syntaxhighlighting-dev libkf6codecs-dev libgtest-dev libgmock-dev libchardet-dev libuchardet-dev libicu-dev deepin-event-log
+  bash ./install_dep /var/cache/apt/archives "$PREFIX"
+
</code_context>
<issue_to_address>
**Stale archives alter the prefix**

When the apt archive directory contains older versions of requested packages or unrelated `.deb` files, `install_dep` processes every `.deb` in the archive directory, so an older package can overwrite the requested version and unrelated packages can be copied into `$PREFIX` and recorded in `packages.list`.

Restrict extraction to the requested packages and select the requested version before copying files.

Also at `linglong.yaml:24`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread linglong.yaml

build: |
# 下载和安装依赖
apt -y install --download-only qt6-5compat-dev qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-base-private-dev qt6-svg-dev libdtk6widget-dev libdtk6gui-dev libdtk6core-dev libdtk6declarative-dev libpolkit-qt6-1-dev libkf6syntaxhighlighting-dev libkf6codecs-dev libgtest-dev libgmock-dev libchardet-dev libuchardet-dev libicu-dev deepin-event-log

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Stale archives alter the prefix

When the apt archive directory contains older versions of requested packages or unrelated .deb files, install_dep processes every .deb in the archive directory, so an older package can overwrite the requested version and unrelated packages can be copied into $PREFIX and recorded in packages.list.

Restrict extraction to the requested packages and select the requested version before copying files.

Also at linglong.yaml:24.

Prompt for AI agents
In `linglong.yaml` at line 23:

**Stale archives alter the prefix**

When the apt archive directory contains older versions of requested packages or unrelated `.deb` files, `install_dep` processes every `.deb` in the archive directory, so an older package can overwrite the requested version and unrelated packages can be copied into `$PREFIX` and recorded in `packages.list`.

Restrict extraction to the requested packages and select the requested version before copying files.

Also at `linglong.yaml:24`.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@pengfeixx
pengfeixx merged commit 58fb3a1 into release/snipe Oct 10, 2026
26 of 29 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