[patch 1/3] Remove flag args from kernel_variant_posttrans

Mark McLoughlin markmc at redhat.com
Wed Jul 30 14:57:28 UTC 2008


plain text document attachment
(kernel-variant-posttrans-cleanup-args.patch)
kernel_variant_posttrans only takes a single arg, so don't bother
using flag arguments since they're a bit more confusing.

Note that the macro invocation didn't actually pass it a flag
arg, but it seemed to have access to the calling macros flag args
anyway.

Index: devel/kernel.spec
===================================================================
--- devel.orig/kernel.spec	2008-07-30 13:32:44.000000000 +0100
+++ devel.orig/kernel.spec	2008-07-30 13:32:44.000000000 +0100
@@ -1527,7 +1527,7 @@ rm -rf $RPM_BUILD_ROOT
 
 #
 # This macro defines a %%post script for a kernel*-devel package.
-#	%%kernel_devel_post <subpackage>
+#	%%kernel_devel_post [<subpackage>]
 #
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
@@ -1545,12 +1545,12 @@ fi\
 %{nil}
 
 # This macro defines a %%posttrans script for a kernel package.
-#	%%kernel_variant_posttrans [-v <subpackage>] [-s <s> -r <r>]
+#	%%kernel_variant_posttrans [<subpackage>]
 # More text can follow to go at the end of this variant's %%post.
 #
-%define kernel_variant_posttrans(s:r:v:) \
-%{expand:%%posttrans %{?-v*}}\
-/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --rpmposttrans %{KVERREL}%{?-v:.%{-v*}} || exit $?\
+%define kernel_variant_posttrans() \
+%{expand:%%posttrans %{?1}}\
+/sbin/new-kernel-pkg --package kernel%{?1:-%{1}} --rpmposttrans %{KVERREL}%{?1:.%{1}} || exit $?\
 %{nil}
 
 #

-- 




More information about the kernel mailing list