Skip to content
Merged
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
13 changes: 5 additions & 8 deletions src/tools/pm_apply
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ log() {
echo "$@" | tee -a "$PM_LOG_FILE"
}

log "Mangle candidates"
log $MANGLE_CANDIDATES
log "Disable mangling"
log $DISABLE_MANGLING

failure() {
log
log "*** FAILED ***"
Expand Down Expand Up @@ -93,14 +88,16 @@ mangle_libpath() {
log "----------------------------------"
log

found=0
candidates="$MANGLE_CANDIDATES"
if [ $SYS_BITNESS -eq 32 ]; then
# first, convert the candidate list
# variable expansion ${foo/lib/lib64} would work on bash, but not POSIX/ash/busybox
candidates=$(printf '%s' "$MANGLE_CANDIDATES" | sed 's@/usr/lib/@/usr/lib64/@g' )
# variable expansion ${foo/lib/lib64} would work on bash, but not POSIX sh or busybox's ash
candidates=$(printf '%s' "$MANGLE_CANDIDATES" | sed 's@/usr/lib/@/usr/lib64/@g')
fi
log "Mangle candidates: $candidates"
log

found=0
for p in $candidates; do
totl_lines=$(grep -c "^\+\+\+" "$PATCH_PATH")
cand_lines=$(grep -c "^\+\+\+ [^/]*$p" "$PATCH_PATH")
Expand Down