deps: migrate from p7zip-full to 7zip package#377
Merged
lzwind merged 1 commit intolinuxdeepin:masterfrom Apr 9, 2026
Merged
Conversation
Replace p7zip-full dependency with official 7zip package for better maintainability and active development support. Changes: - Update CLI plugin regex to support both p7zip Version and 7-Zip formats - Replace dependency: p7zip-full → 7zip in debian/control files - Update plugin name from 'P7zip plugin' to '7-Zip plugin' in all languages - Update documentation and comments referencing p7zip - Add unit tests for backward compatibility with p7zip format Maintains full backward compatibility with p7zip-created archives while leveraging the official 7zip package for future updates. Log: 从p7zip-full迁移到official 7zip包 TASK: https://pms.uniontech.com/task-view-388177.html
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMigrates runtime dependency from p7zip-full to the official 7zip package while keeping the CLI 7z plugin fully compatible with both p7zip and 7-Zip version output formats, updating related comments, metadata, and docs, and adding unit tests for the new parsing behavior. Sequence diagram for cli7z version detection with p7zip and 7-Zip outputssequenceDiagram
participant DeepinCompressor
participant Cli7zPlugin
participant SevenZBinary
DeepinCompressor->>Cli7zPlugin: listArchive(filePath)
Cli7zPlugin->>SevenZBinary: 7z l filePath
SevenZBinary-->>Cli7zPlugin: text output (multiple lines)
loop for each output line
Cli7zPlugin->>Cli7zPlugin: readListLine(line)
alt version line (p7zip format)
Note over Cli7zPlugin: line matches regex
Cli7zPlugin->>Cli7zPlugin: extract version from "p7zip Version X.YZ"
else version line (7-Zip format)
Note over Cli7zPlugin: line matches same regex
Cli7zPlugin->>Cli7zPlugin: extract version from "7-Zip X.YZ"
else other lines
Cli7zPlugin->>Cli7zPlugin: handle file listing or ignore
end
end
Cli7zPlugin-->>DeepinCompressor: parsed archive contents and metadata
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The version line regex
^(?:p7zip Version|7-Zip) ([\d\.]+) .*$assumes only digits and dots in the version; if 7-Zip or p7zip introduces suffixes (e.g. beta tags), this will fail—consider relaxing the capture group to something like([^ ]+)or similar. - In
UiTools::createInterface, the comment says "删除cli7z插件" while the code still checksplugin->metaData().name().contains("7zip", Qt::CaseInsensitive); verify the plugin metadata name and update either the condition or the comment to match the actual identifier being filtered.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The version line regex `^(?:p7zip Version|7-Zip) ([\d\.]+) .*$` assumes only digits and dots in the version; if 7-Zip or p7zip introduces suffixes (e.g. beta tags), this will fail—consider relaxing the capture group to something like `([^ ]+)` or similar.
- In `UiTools::createInterface`, the comment says "删除cli7z插件" while the code still checks `plugin->metaData().name().contains("7zip", Qt::CaseInsensitive)`; verify the plugin metadata name and update either the condition or the comment to match the actual identifier being filtered.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
lzwind
approved these changes
Apr 9, 2026
liujianqiang-niu
approved these changes
Apr 9, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, liujianqiang-niu, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/merge |
Contributor
Author
|
/forcemerge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace p7zip-full dependency with official 7zip package for better maintainability and active development support.
Changes:
Maintains full backward compatibility with p7zip-created archives while leveraging the official 7zip package for future updates.
Log: 从p7zip-full迁移到official 7zip包
TASK: https://pms.uniontech.com/task-view-388177.html
Summary by Sourcery
Migrate the CLI 7z integration and packaging from the p7zip-full dependency to the official 7zip package while preserving compatibility with existing archives.
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: