Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/tools/pm_apply
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ mangle_libpath() {
pr=$(printf '%s' "$p" | sed 's@/usr/lib/@/usr/lib64/@')
fi
# doit
mkdir -p "$PM_PATCH_BACKUP_DIR"
patch_edited_path="$PM_PATCH_BACKUP_DIR"/"$PATCH_EDITED_NAME"
printf '#\n# Patch converted to %sbit library paths from its original by Patchmanager > 3.1\n# Date: %s\n#\n' $SYS_BITNESS $(date -Iseconds) > "$patch_edited_path"
sed "s@^+++ $p@+++ $pr@;s@^--- $p@--- $pr@" "$PATCH_PATH" >> "$patch_edited_path"
if [ $found -eq $cand_lines ]; then # first run in loop
mkdir -p "$PM_PATCH_BACKUP_DIR"
patch_edited_path="$PM_PATCH_BACKUP_DIR"/"$PATCH_EDITED_NAME"
printf '#\n# Patch converted to %sbit library paths from its original by Patchmanager > 3.1\n# Date: %s\n#\n' $SYS_BITNESS $(date -Iseconds) > "$patch_edited_path"
cat "$PATCH_PATH" >> "$patch_edited_path"
fi
sed -i "s@^+++ $p@+++ $pr@;s@^--- $p@--- $pr@" "$patch_edited_path" # patch the Patch
if [ $? -ne 0 ]; then
failure
fi
Expand Down