refactor UAB#1212
Merged
Merged
Conversation
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
ffc095d to
d15e22b
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the UAB by removing several obsolete OCI configuration generator files and updating multiple components across the UAB packager, loader, and header. Key changes include the deletion of numerous legacy generator source/header files, refactoring of filesystem/stat API usage in the packager code, and substantial updates to error handling and process termination in the UAB loader/main code.
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/oci-cfg-generators/src/linglong/oci-cfg-generators/20_devices.cpp | Replaces old stat-based filesystem checks with statvfs, and now compares f_fsid fields. |
| libs/linglong/src/linglong/package/uab_packager.cpp | Introduces a new prepareSymlink function and updates error handling and symlink resolution logic. |
| apps/uab/loader/src/main.cpp and apps/uab/header/* | Updates include paths, process termination behavior, and memory allocation in digest calculation, along with various error-handling improvements. |
Comments suppressed due to low confidence (2)
libs/oci-cfg-generators/src/linglong/oci-cfg-generators/20_devices.cpp:527
- Using f_fsid instead of st_dev for filesystem comparison is a significant change; please verify that this comparison correctly determines filesystem identity on all target platforms.
const bool shouldCopy = moduleFilesDirStat.f_fsid != filesStat.f_fsid;
apps/uab/header/src/main.cpp:126
- Using aligned allocation with ::operator new is appropriate, but please ensure that the chosen alignment (derived from the system page size) is portable and correctly meets all requirements on target platforms.
auto *buf = ::operator new(chunkSize, alignment, std::nothrow);
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
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.
No description provided.