version: fix vercmp impl to fully match alpm behavior
There were multiple shortcomings with the current implementation compared to the behavior of the official libalpm implementation. One of the primary differences requires a version segment to be handled chunk by chunk whether its numeric or none numeric. Furthermore differences in segment separators (none alpha-numeric characters) requires special handling to get the same results as libalpm.
As there are just too many edge cases this changes implements the original libalpm vercmp algorithm as is.
Furthermore move everything out of models.py
into an own version
module which is included. This will make it tremendously easier to
potentially support multiple version schemas for different consumers in
the future.
Fixes #63 (closed)
Signed-off-by: Levente Polyak anthraxx@archlinux.org