]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- use variable in for cfg loop as empty list takes $*: (set -- 1 2; for cfg; do echo...
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 28 Oct 2007 11:10:58 +0000 (11:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.399

rpm.macros

index 6611ac9ed2aa8b46852ecb97b518d328110c3004..ab063fd96662dd48e9d194fc448da77ac5a4ab67 100644 (file)
@@ -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> -- suffix to use when installing modules, useful when module
 #              with same name exists in kernel already
 #  -n <file> -- 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}         \
This page took 0.040672 seconds and 4 git commands to generate.