Skip to contentSkip to conversation

backports: fix high RC version parsing in dependency library

PATCH In review Mathy Vanhoef 4 participants 5 messages Apr 27, 2015 – Apr 28, 2015 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: fix high RC version parsing in dependency library

This updates the dependency library to handle RC versions up to 39. For example, coccinelle version "1.0.0" is now correctly treated as being higher than version "1.0.0-rc24".

---
 lib/bpreqs.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bpreqs.py +1 -1
index 6c46670..4399c6d 100644
@@ -98,7 +98,7 @@ class Req:
                 if (rc == ""):
                     rc = 0
                 else:
-                    rc = int(rc) - 20
+                    rc = int(rc) - 40
                 extra = int(rc)
             else:
                 extra = int(rel_specs['EXTRAVERSION']) + 10
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Mathy Vanhoef

This updates the dependency library to handle RC versions up to 39. For example, coccinelle version "1.0.0" is now correctly treated as being higher than version "1.0.0-rc24".

This one is duplicate to the patch Eliad submitted [1]. Any reason for choosing rc 40?

Regards,
Arend

[1] http://mid.gmane.org/[email protected]

Quoted 18 lines
---
  lib/bpreqs.py |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/bpreqs.py +1 -1
index 6c46670..4399c6d 100644
@@ -98,7 +98,7 @@ class Req:
                  if (rc == ""):
                      rc = 0
                  else:
-                    rc = int(rc) - 20
+                    rc = int(rc) - 40
                  extra = int(rc)
              else:
                  extra = int(rel_specs['EXTRAVERSION']) + 10
#2 lore raw
Quoted 10 lines · Arend van Spriel
Quoted 5 lines · Mathy Vanhoef

This updates the dependency library to handle RC versions up to 39. For example, coccinelle version "1.0.0" is now correctly treated as being higher
than version "1.0.0-rc24".

This one is duplicate to the patch Eliad submitted [1]. Any reason for choosing rc 40?

I missed that patched. My reasoning was that previously at least the Linux kernel went up to rc 39 with 2.6.39. So 40 should be a good limit to support most cases.

Kr,
Mathy

Quoted 26 lines

Regards,
Arend

[1] http://mid.gmane.org/[email protected]

Quoted 18 lines
---
  lib/bpreqs.py |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/bpreqs.py +1 -1
index 6c46670..4399c6d 100644
@@ -98,7 +98,7 @@ class Req:
                  if (rc == ""):
                      rc = 0
                  else:
-                    rc = int(rc) - 20
+                    rc = int(rc) - 40
                  extra = int(rc)
              else:
                  extra = int(rel_specs['EXTRAVERSION']) + 10
#3 lore raw
Quoted 9 lines · Mathy Vanhoef
Quoted 8 lines · Arend van Spriel
Quoted 5 lines · Mathy Vanhoef

This updates the dependency library to handle RC versions up to 39. For example, coccinelle version "1.0.0" is now correctly treated as being higher
than version "1.0.0-rc24".

Quoted 7 lines
Quoted 2 lines

This one is duplicate to the patch Eliad submitted [1]. Any reason for choosing rc 40?

I missed that patched. My reasoning was that previously at least the Linux kernel went up to rc 39 with 2.6.39. So 40 should be a good limit to support most cases.

note that 39 in this case is the "sublevel", not the "extraversion".

Eliad.

#4 lore raw
Quoted 13 lines · Eliad Peller
Quoted 12 lines · Mathy Vanhoef
Quoted 10 lines · Arend van Spriel
Quoted 5 lines · Mathy Vanhoef

This updates the dependency library to handle RC versions up to 39. For example, coccinelle version "1.0.0" is now correctly treated as being higher
than version "1.0.0-rc24".

This one is duplicate to the patch Eliad submitted [1]. Any reason for choosing rc 40?

Quoted 7 lines
Quoted 4 lines

I missed that patched. My reasoning was that previously at least the Linux kernel went up to rc 39 with 2.6.39. So 40 should be a good limit to support most cases.

note that 39 in this case is the "sublevel", not the "extraversion".

Eliad.

I will take your patch Eliad. There are so many magic numbers in this code it probably has to get cleaned up, a warning for such a case like we have it now would also be nice.

Hauke