plain text document attachment (kernel-variant-post-kill-replace-arg.patch) The -r arg is redundant because we already now the variant name so we can use kernel%{?-v:-%{-v*}} instead. So, rename the -s arg to -r and drop the existing meaning of -r. Index: devel/kernel.spec =================================================================== --- devel.orig/kernel.spec 2008-07-30 14:15:15.000000000 +0100 +++ devel.orig/kernel.spec 2008-07-30 14:15:15.000000000 +0100 @@ -1555,17 +1555,17 @@ fi\ # # This macro defines a %%post script for a kernel package and its devel package. -# %%kernel_variant_post [-v <subpackage>] [-s <s> -r <r>] +# %%kernel_variant_post [-v <subpackage>] [-r <replace>] # More text can follow to go at the end of this variant's %%post. # -%define kernel_variant_post(s:r:v:) \ +%define kernel_variant_post(v:r:) \ %{expand:%%kernel_devel_post %{?-v*}}\ %{expand:%%kernel_variant_posttrans %{?-v*}}\ %{expand:%%post %{?-v*}}\ -%{-s:\ +%{-r:\ if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\ [ -f /etc/sysconfig/kernel ]; then\ - /bin/sed -i -e 's/^DEFAULTKERNEL=%{-s*}$/DEFAULTKERNEL=%{-r*}/' /etc/sysconfig/kernel || exit $?\ + /bin/sed -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\ fi}\ /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod --install %{KVERREL}%{?-v:.%{-v*}} || exit $?\ #if [ -x /sbin/weak-modules ]\ @@ -1588,18 +1588,18 @@ fi}\ %{nil} %kernel_variant_preun -%kernel_variant_post -s kernel-smp -r kernel +%kernel_variant_post -r kernel-smp %kernel_variant_preun smp %kernel_variant_post -v smp %kernel_variant_preun PAE -%kernel_variant_post -v PAE -s kernel-smp -r kernel-PAE +%kernel_variant_post -v PAE -r kernel-smp %kernel_variant_preun debug %kernel_variant_post -v debug -%kernel_variant_post -v PAEdebug -s kernel-smp -r kernel-PAEdebug +%kernel_variant_post -v PAEdebug -r kernel-smp %kernel_variant_preun PAEdebug if [ -x /sbin/ldconfig ] -- _______________________________________________ Fedora-kernel-list mailing list Fedora-kernel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-kernel-list