Skip to content

Commit 369bf9b

Browse files
committed
Enhance requires with version information from the build root.
For shared objects without versioned symbols, this additional information allows rpm to track minor-version dependencies.
1 parent a9ac172 commit 369bf9b

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

macros.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
552552
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
553553
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
554554
%__find_provides %{_rpmconfigdir}/find-provides
555-
%__find_requires %{_rpmconfigdir}/find-requires
555+
%__find_requires %{_rpmconfigdir}/enhance-requires
556556
#%__find_conflicts ???
557557
#%__find_obsoletes ???
558558

scripts/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ install(PROGRAMS
44
brp-strip-static-archive brp-elfperms brp-remove-la-files
55
check-files check-prereqs
66
check-buildroot check-rpaths check-rpaths-worker
7-
find-lang.sh find-requires find-provides
7+
find-lang.sh enhance-requires find-requires find-provides
88
perl.prov perl.req
99
pkgconfigdeps.sh
1010
ocamldeps.sh

scripts/enhance-requires

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
version_deps () {
4+
while read dep
5+
do
6+
if [[ "${dep}" =~ ^[^\(]*\(\) ]] && rpm -q --whatprovides "${dep}" &> /dev/null
7+
then
8+
printf "($dep with %s)\n" "$(rpm -q --whatprovides "${dep}" --qf '%{NAME} >= %{VERSION}')"
9+
else
10+
printf "%s\n" "${dep}"
11+
fi
12+
done
13+
}
14+
15+
/usr/lib/rpm/find-requires | version_deps

0 commit comments

Comments
 (0)