blob: ca2870155061f597f104da6f13f2787d76a9aa68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 8fc4e71f9b51438f09c8206ceb1b407bbaca8aab Mon Sep 17 00:00:00 2001
From: Florian Festi <ffesti@redhat.com>
Date: Tue, 17 Sep 2024 13:13:13 +0200
Subject: [PATCH] brp-remove-la-files: Remove symlinks, too
As we check for file contents delete symlink before looking at regular
files.
Resolves: #3304
---
scripts/brp-remove-la-files | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/brp-remove-la-files b/scripts/brp-remove-la-files
index 58c513bf88..cffbd655c5 100755
--- a/scripts/brp-remove-la-files
+++ b/scripts/brp-remove-la-files
@@ -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
|