diff options
-rwxr-xr-x | rpmbuildupdate | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index f90dfd4..46afde7 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -242,14 +242,14 @@ sub build { # case of %define release %mkrel 2 if ( /^(.*\s\%mkrel\s+)(\d+)(.*)$/ ) { - $_ = "$1" . ( $2 + 1 ) . "$3\n"; + $_ = "$1" . ((( $version eq $newversion ) ? $2 : 0 ) + 1 ) . "$3\n"; } # case of %define release %mkrel %rel # and %define rel 2 if ( /^(\%define\s+rel\s+)(\d+)(.*)$/ ) { - $_ = "$1" . ( $2 + 1 ) . "$3\n"; + $_ = "$1" . ((( $version eq $newversion ) ? $2 : 0 ) + 1 ) . "$3\n"; } |