SOURCES: rpm.macros - same rules for requires_releq
glen
glen at pld-linux.org
Wed Feb 11 20:46:25 CET 2009
Author: glen Date: Wed Feb 11 19:46:25 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- same rules for requires_releq
---- Files affected:
SOURCES:
rpm.macros (1.503 -> 1.504)
---- Diffs:
================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.503 SOURCES/rpm.macros:1.504
--- SOURCES/rpm.macros:1.503 Wed Feb 11 20:39:45 2009
+++ SOURCES/rpm.macros Wed Feb 11 20:46:19 2009
@@ -313,8 +313,6 @@
# If non-empty "debug" macro defined, add "dbg" suffix to release number
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
-# Requires name = version-release
-%requires_releq() %(Z=$(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %{N} = %|E?{%{E}:}|%{V}-%{R}\\n'); if echo "$Z" | ! grep -v '^Requires:'; then echo "$Z"; fi)
%releq_kernel %{expand:%%global releq_kernel %(R=$(LC_ALL=C rpm -q --qf '%{N} = %|E?{%{E}:}|%{V}-%{R}' -f %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | grep -v 'is not' | sed -e 's:-headers::;s:-config::'); echo ${R:-ERROR})}%releq_kernel
%releq_kernel_up %{expand:%%global releq_kernel_up %(R=$(LC_ALL=C rpm -q --qf '%{N}-up = %|E?{%{E}:}|%{V}-%{R}' -f %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | grep -v 'is not' | sed -e 's:-headers::;s:-config::'); echo ${R:-ERROR})}%releq_kernel_up
@@ -323,10 +321,12 @@
%requires_releq_kernel_up(s:) Requires%{-s:(%{-s*})}: %releq_kernel_up
%requires_releq_kernel_smp(s:) Requires%{-s:(%{-s*})}: %releq_kernel_smp
+# Requires name = version-release
+%requires_releq() %{!?1:ERROR}%{?2:ERROR}%{?1:%{!?2:%{expand:%%requires_eq_to -r %1 %1}}}
# Requires: name = version
%requires_eq() %{!?1:ERROR}%{?2:ERROR}%{?1:%{!?2:%{expand:%%requires_eq_to %1 %1}}}
# Requires: name = version (version based on querying package %2)
-%requires_eq_to() %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(Z=$(LC_ALL=C rpm -q --qf 'Requires: %1 = %|E?{%{E}:}|%{V}\\n' %2); if ! echo "$Z" | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
+%requires_eq_to(r) %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(Z=$(LC_ALL=C rpm -q --qf 'Requires: %1 = %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2); if ! echo "$Z" | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
%apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.503&r2=1.504&f=u
More information about the pld-cvs-commit
mailing list