Skip to content

Commit

Permalink
brp-remove-la-files: Remove symlinks, too
Browse files Browse the repository at this point in the history
As we check for file contents delete symlink before looking at regular
files.

Resolves: rpm-software-management#3304
  • Loading branch information
ffesti committed Sep 17, 2024
1 parent c8ceb9b commit 8fc4e71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/brp-remove-la-files
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi

# Check and remove symlinks first
find "$RPM_BUILD_ROOT" -type l -name '*.la' 2>/dev/null -print0 |
xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
xargs -0 rm --force

# Process regular files
find "$RPM_BUILD_ROOT" -type f -name '*.la' 2>/dev/null -print0 |
xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null |
xargs -0 rm --force

0 comments on commit 8fc4e71

Please sign in to comment.