From 00395cf1b5d754671a2609b40b38f39960abc151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 28 Oct 2007 11:10:58 +0000 Subject: [PATCH] - use variable in for cfg loop as empty list takes $*: (set -- 1 2; for cfg; do echo $cfg; done) --> 1 2 Changed files: rpm.macros -> 1.399 --- rpm.macros | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpm.macros b/rpm.macros index 6611ac9..ab063fd 100644 --- a/rpm.macros +++ b/rpm.macros @@ -1167,8 +1167,9 @@ done \ compile() { \ L="<"; [[ '%{*}' != *$L$L* ]] || PATCH_SH="set -x -e;$(cat)" \ set -e -x \ + local cfgs='%{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}' \ \ -for cfg in %{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}; do \ +for cfg in $cfgs; do \ [ -r "%{_kernelsrcdir}/config-$cfg" ] || exit 1 \ \ rm -rf o \ @@ -1179,7 +1180,7 @@ for cfg in %{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}; do \ %ifarch ppc ppc64 \ install -d o/include/asm \ [ ! -d %{_kernelsrcdir}/include/asm-%{_target_base_arch} ] || ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* o/include/asm \ - [ ! -d %{_kernelsrcdir}/include/asm-powerpc ] || ln -snf %{_kernelsrcdir}/include/asm-powerpc/* o/include/asm \ + [ ! -d %{_kernelsrcdir}/include/asm-powerpc ] || ln -snf %{_kernelsrcdir}/include/asm-powerpc/* o/include/asm \ %else \ ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm \ %endif \ @@ -1229,7 +1230,7 @@ compile %{*}\ # -s -- suffix to use when installing modules, useful when module # with same name exists in kernel already # -n -- name of modprobe config file to use (without .conf extension) -# for definig aliases, only useful with -s +# for defining aliases, only useful with -s %install_kernel_modules(m:d:s:n:) \ %{!?-m:%{error:%{0}: Required module name (-m) missing}exit 1} \ -- 2.44.0