SOURCES: rpm.macros - fix %releq_kernel_* macros to return anythin...
glen
glen at pld-linux.org
Thu Mar 2 18:32:29 CET 2006
Author: glen Date: Thu Mar 2 17:32:29 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix %releq_kernel_* macros to return anything, to prevent spec parse errors
- add -s option to specify a scriptlet for %requires_releq_kernel_* macros
- cosmetics
---- Files affected:
SOURCES:
rpm.macros (1.285 -> 1.286)
---- Diffs:
================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.285 SOURCES/rpm.macros:1.286
--- SOURCES/rpm.macros:1.285 Mon Feb 27 10:39:19 2006
+++ SOURCES/rpm.macros Thu Mar 2 18:32:24 2006
@@ -188,10 +188,10 @@
# Requires name = version-release
%requires_releq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}-%%{release}\\n' | sed -e 's/ (none):/ /' | grep -v "is not")
-%releq_kernel_up() %(LC_ALL="C" rpm -qf --qf '%%{name}-up = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
-%releq_kernel_smp() %(LC_ALL="C" rpm -qf --qf '%%{name}-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
-%requires_releq_kernel_up() %(LC_ALL="C" rpm -qf --qf 'PreReq: %%{name}-up = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
-%requires_releq_kernel_smp() %(LC_ALL="C" rpm -qf --qf 'PreReq: %%{name}-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
+%releq_kernel_up() %(LC_ALL="C" rpm -qf --qf '%%{name}-up = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h 2>/dev/null || echo ERROR | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
+%releq_kernel_smp() %(LC_ALL="C" rpm -qf --qf '%%{name}-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h 2>/dev/null || echo ERROR | sed -e 's/ (none):/ /' | sed -e 's:-headers::' | grep -vE "(is not|no such)")
+%requires_releq_kernel_up(s:) Requires%{-s:(%{-s*})}: %releq_kernel_up
+%requires_releq_kernel_smp(s:) Requires%{-s:(%{-s*})}: %releq_kernel_smp
%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_eq_to() %(LC_ALL="C" rpm -q --qf 'Requires: %1 = %%{epoch}:%%{version}\\n' %2 | sed -e 's/ (none):/ /' | grep -v "is not")
@@ -651,6 +651,8 @@
# apache_config_{install/uninstall} macros written by glen at pld-linux.org.
# All rights reserved. Permission to copy is hereby granted.. yada, yada, yada
#
+# You should use webapp macros instead. these are here until single piece of them is gone from specs ;)
+#
# The config is installed/removed inside trigger, this means that you can any
# time install apache1 or apache package and the configuration file is updated.
# if you don't need the config for various reason for specific apache, just
@@ -789,6 +791,6 @@
# Usage:
# %service [-q] SERVICE ACTION ["SERVICE NICE DESCRIPTION"]
#
-# -q be silent when service isn't started (for postun scriplets)
+# -q be silent when service isn't started (for scriplets restaring other package's services)
#
%service(q) {{%(export quiet=%{-q:1}; /usr/lib/rpm/service_generator.sh %{*}) };}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.285&r2=1.286&f=u
More information about the pld-cvs-commit
mailing list