Repository navigation
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: re2zero 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 |
Reviewer's GuideMigrates dependency management in linglong.yaml from manual apt/install/deploy scripting to declarative buildext.apt, while adding build-time path normalization and library relocation needed for the existing CMake build and runtime ldd checks. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
a4fac8c to
2520250
Compare
1. Replace manual apt --download-only, install_dep, deploy_dep and .install
generation with declarative buildext.apt build_depends/depends.
2. Add sed to fix include path (${CMAKE_INSTALL_PREFIX}/include -> /usr/include)
in src/CMakeLists.txt at build time, since buildext.apt installs to system paths.
3. Copy libblas.so.3/liblapack.so.3 from alternatives subdirs to $PREFIX/lib/$TRIPLET/
so ffmpegthumbnailer passes ldd runtime check.
Log: Migrate linglong.yaml from manual install_dep/deploy_dep to buildext.apt.
Influence:
1. linglong build uses buildext.apt for dependency management.
2. ll-builder build passes including ldd runtime check.
PMS:Task-396575 Multica: V-6803
2520250 to
ca16c56
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ❌评价: 存在逻辑缺陷 ❌ 不通过 潜在问题: 建议: ['在 sed 命令后追加: sed -i "s|${CMAKE_INSTALL_PREFIX}/share|/usr/share|g" src/CMakeLists.txt,或显式复制 libimagevisualresult 资源文件到 ${PREFIX}/share/', '在 buildext.apt.depends 中显式添加应用直接链接的关键运行时库,如 libavcodec-extra60、libv4l-0、libusb-1.0-0 等'] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: ['将 || true 改为 || echo "WARNING: libblas/liblapack not found in alternatives path",使失败可见于构建日志'] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例# linglong.yaml build 段修复示例:
build: |
# 修改路径
find src -type f -name "*.service" -exec sed -i 's|^Exec=.*|Exec=deepin-camera|g' {} +
# buildext.apt 安装依赖到系统路径而非 $PREFIX,修正 CMakeLists.txt 中的 include 和 share 路径
sed -i 's|${CMAKE_INSTALL_PREFIX}/include|/usr/include|g' src/CMakeLists.txt
sed -i 's|${CMAKE_INSTALL_PREFIX}/share|/usr/share|g' src/CMakeLists.txt
# 构建
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
cmake -B build ${conf_args} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build -j`nproc`
cmake --build build --target install > install.log 2>&1
# blas/lapack 通过 alternatives 安装到子目录,复制到主库目录以供 ldd 检查通过
mkdir -p ${PREFIX}/lib/${TRIPLET}
cp -aL /usr/lib/${TRIPLET}/blas/libblas.so.3* ${PREFIX}/lib/${TRIPLET}/ 2>/dev/null || echo "WARNING: libblas.so.3 not found in alternatives path"
cp -aL /usr/lib/${TRIPLET}/lapack/liblapack.so.3* ${PREFIX}/lib/${TRIPLET}/ 2>/dev/null || echo "WARNING: liblapack.so.3 not found in alternatives path"
# buildext.apt.depends 补充关键运行时库:
buildext:
apt:
depends:
- libffmpegthumbnailer4v5
- libportaudio2
- deepin-event-log
- libimageeditor6
- libsdl2-2.0-0
- gstreamer1.0-plugins-good
- libavcodec-extra60
- libv4l-0
- libusb-1.0-0本报告由 AI 代码审查工具自动生成 |
|
#534 已合入 |
Summary
Migrate
linglong.yamlfrom manualinstall_dep/deploy_dep/apt --download-onlyto declarativebuildext.apt.Changes
apt --download-only,install_dep,deploy_depand.installgeneration withbuildext.apt.build_depends/buildext.apt.depends.sedcommand to fix${CMAKE_INSTALL_PREFIX}/include→/usr/includeinsrc/CMakeLists.txtat build time (required becausebuildext.aptinstalls dependencies to system paths, not ``).libblas.so.3/liblapack.so.3from alternatives subdirs to\$PREFIX/lib/\$TRIPLET/soffmpegthumbnailerpasses the ldd runtime check.Verification
ll-builder build(including ldd runtime check) passes successfully.linglong.yamlis modified; no source files changed.Notes
Summary by Sourcery
Migrate the Linglong package build to declarative buildext.apt dependency management while preserving required runtime library availability.
Enhancements:
Build:
Chores: