rpm/requires-ge-macro.diff

13 lines
619 B
Diff

--- ./macros.in.orig 2019-10-02 11:33:19.956358174 +0000
+++ ./macros.in 2019-10-02 11:35:01.496144862 +0000
@@ -1312,5 +1312,9 @@ end}
%{expand:%__scm_setup_%{__scm} %{!-v:-q}}\
%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}
+# XXX: to be moved to rpm-config-SUSE
+%requires_eq() %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
+%requires_ge() %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
+
# \endverbatim
#*/