diff mbox series

[5/7] lib/bpversion: calculate Kconfig.versions for next major version

Message ID 20211124055505.1267128-6-thomas@adapt-ip.com (mailing list archive)
State New, archived
Headers show
Series Resurrect backports Integration Mode | expand

Commit Message

Thomas Pedersen Nov. 24, 2021, 5:55 a.m. UTC
Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 lib/bpversion.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/bpversion.py b/lib/bpversion.py
index aefdcf0ce3c9..1659823baaf4 100644
--- a/lib/bpversion.py
+++ b/lib/bpversion.py
@@ -42,7 +42,12 @@  def kernelversion(tree):
 
 def genkconfig_versions(rel_specs):
     data = ''
-    for i in range(int(rel_specs['PATCHLEVEL']) + 1, 99):
-        data += "config BACKPORT_KERNEL_%s_%s\n" % (rel_specs['VERSION'], i)
-        data += "    def_bool y\n"
+    print(str(rel_specs))
+    version = int(rel_specs['VERSION'])
+    start_patchlevel = int(rel_specs['PATCHLEVEL']) + 1
+    for i in range(version, version + 2):
+        for j in range(start_patchlevel, 99):
+            data += "config BACKPORT_KERNEL_%s_%s\n" % (i, j)
+            data += "    def_bool y\n"
+        start_patchlevel = 0
     return data