]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- use expr instead of shell internal to avoid base conversion auto/ac/rpm-build-macros-1_353-1
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 22 Dec 2006 20:39:21 +0000 (20:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.353

rpm.macros

index 96ad4d9d9b0d97264e3ad400cc0f90d9278aa5c6..db98c24e2f32a1b344e6b34a6aa3aa31e4fc3076 100644 (file)
@@ -1291,24 +1291,26 @@ done                                                                                                                            \
 # The sources start from 10000
 %patchset_source(f:b:) %(
        base=%{-b*}%{!-b*:10000};
-       start=$((%1 + $base));
-       end=$((%{?2}%{!?2:%{1}} + $base));
+       start=$(expr $base + %1);
+       end=$(expr $base + %{?2}%{!?2:%{1}});
        # we need to call seq twice as it doesn't allow two formats
        seq -f 'Patch%g:' $start $end > %{tmpdir}/__ps1;
        seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{tmpdir}/__ps2;
        paste %{tmpdir}/__ps{1,2};
        rm -f %{tmpdir}/__ps{1,2};
-) %{nil}
+) \
+%{nil}
 
 # apply sources from %patchset_source
 # -p specify -pX for %patch line
 # -b base offset: defaults to 10000
 %patchset_patch(f:p:b:) %(
        base=%{-b*}%{!-b*:10000};
-       start=$((%1 + $base));
-       end=$((%{?2}%{!?2:%{1}} + $base));
+       start=$(expr $base + %1);
+       end=$(expr $base + %{?2}%{!?2:%{1}});
        echo ": patchset_patch %1%{?2: to %2}";
        seq -f 'patch%g %{-p*:-p%{-p*}}' $start $end | sed -e s,^,%%,;
-) %{nil}
+) \
+%{nil}
 
 # vim:ts=4 sw=4 noet syn=spec
This page took 0.040952 seconds and 4 git commands to generate.