Fix patch application in container.

This commit is contained in:
Matt Spencer
2026-07-17 14:38:53 +00:00
parent bd531ee9cb
commit 48eb4d10fd
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ COPY patches ./patches/
COPY upstream.jazzy.repos ./upstream.jazzy.repos
# Import all upstream repostories
RUN vcs import ./src/upstream < ./upstream.jazzy.repos
RUN mkdir -p src/upstream && vcs import ./src/upstream < ./upstream.jazzy.repos
# Apply patches to upstream
RUN ./patches/apply_patches.sh
+5 -4
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
set -u
ROOT_DIR="/workspaces/agv_pro_ros2"
PATCH_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(dirname "$PATCH_DIR")"
PATCH_DIR="$ROOT_DIR/patches"
apply_patch_once() {
@@ -23,8 +24,8 @@ apply_patch_once() {
|| git -C "$target_dir" apply --reverse --check "$patch_file" >/dev/null 2>&1
}
apply_patch_once "$ROOT_DIR/src/upstream/livox_sdk" "$PATCH_DIR/livox_sdk.patch"
apply_patch_once "$ROOT_DIR/src/upstream/slam_gmapping" "$PATCH_DIR/slam_gmapping.patch"
apply_patch_once "$ROOT_DIR/src/upstream/FAST_LIO" "$PATCH_DIR/fast_lio.patch"
apply_patch_once "$ROOT_DIR/src/upstream/unilidar_sdk2" "$PATCH_DIR/unilidar_sdk2.patch"
apply_patch_once "$ROOT_DIR/src/upstream/livox_sdk" "$PATCH_DIR/livox_sdk.patch"
apply_patch_once "$ROOT_DIR/src/upstream/livox_ros_driver2" "$PATCH_DIR/livox_ros_driver2.patch"
apply_patch_once "$ROOT_DIR/src/upstream/slam_gmapping" "$PATCH_DIR/slam_gmapping.patch"
apply_patch_once "$ROOT_DIR/src/upstream/unilidar_sdk2" "$PATCH_DIR/unilidar_sdk2.patch"