Re: [PATCH 2/4] scripts: add reqs python library
From: Michal Marek
Date: Wed Jun 15 2016 - 03:50:28 EST
On 2016-06-15 00:10, Luis R. Rodriguez wrote:
> + weight = (int(rel_specs['VERSION']) << 32) + \
> + (int(rel_specs['PATCHLEVEL']) << 16) + \
> + (sublevel << 8 ) + \
> + (extra * 60) + (relmod * 2)
This is going to silently break as soon as we have a version number with
e.g. a time stamp embedded. And there is actually no need to convert the
version string to an integer. You can convert them to arrays of
components and compare the components one by one.
Michal