diff options
author | Eliad Peller <eliad@wizery.com> | 2015-04-27 12:19:04 +0300 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-04-27 22:04:24 +0200 |
commit | 981e0abc8a0b4a7d0327007ef455762efc92bcc0 (patch) | |
tree | 55b7c8886299821d0ed8826355531b6739538559 /lib | |
parent | 29d880cb271c763bb2142da243bc026ccf2cd3e1 (diff) |
backports: fix coccinelle version check
bpreqs.py assumes the max rc level is 20. However,
backports currently requires coccinelle 1.0.0-rc24
(which is the latest rc before 1.0.0).
This resulted in 1.0.0-rc24 getting higher weight
than 1.0.0, which failed the dependency check.
Fix it by increasing the max rc to 25 (and use
a constant for it)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bpreqs.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bpreqs.py b/lib/bpreqs.py index 6c466701..1325fd21 100644 --- a/lib/bpreqs.py +++ b/lib/bpreqs.py @@ -78,6 +78,8 @@ class Req: sys.stdout.write("You are using for version: %s\n" % stdout.split()[version_pos]) sys.stdout.write("Specifically your idx, element: %s\n" % ([[i, x] for i, x in enumerate(stdout.split())][version_pos])) return stdout.split()[version_pos] + + MAX_RC = 25 def __compute_rel_weight(self, rel_specs): weight = 0 extra = 0 @@ -98,7 +100,7 @@ class Req: if (rc == ""): rc = 0 else: - rc = int(rc) - 20 + rc = int(rc) - (Req.MAX_RC + 1) extra = int(rc) else: extra = int(rel_specs['EXTRAVERSION']) + 10 |