#90 Allow for minor release bump
Opened 2 years ago by mr.tao. Modified 2 years ago
mr.tao/rpmdevtools allow-for-minor-release-bump  into  main

file modified
+1 -1
@@ -243,7 +243,7 @@ 

          if string is None:

              string = ""

          relre = re.compile(r'(?P<prefix>.+\.)' + re.escape(string) +

-                            r'(?P<post>\d+$)')

+                            r'(?P<post>.+$)')

          relmatch = relre.search(release)

          if relmatch:

              prefix = relmatch.group('prefix')

Bumping of the rightmost digit does not work for a minor release:

$ rpmdev-bumpspec -c "Foo" -r -V bar.spec
bar.spec
-1.0.5%{?dist}
+1.0.5%{?dist}.1

With the proposed change:

$ rpmdev-bumpspec -c "Foo" -r -V bar.spec
bar.spec
-1.0.5%{?dist}
+1.0.6%{?dist}

The patch is problematic for two reasons.

Your %release versioning scheme doesn't meet Fedora's packaging guidelines. For ordinary release bumps, the leading digit is to be increased. Unless a pre-release scheme with a "0." prefix is followed. In that case, the number after "0." will be increased.

You are abusing the increaseFallback method here. It kicks in when no valid release versioning scheme is adhered to. In that case, a trailing ".N" digit will be increased, if it's present already. Else, ".1" will be added to introduce a minor release bump.

Option "-r" is not what you want, since it tries to enforce minor release bumps at the very right side of the %release value. And it does that correctly in your quoted example where it appended ".1".

Metadata