Proper fix is quite complex and given we do not package pre-release
versions very often (and esp. not multiple versions of them), this is
good enough (not nice though).
Signed-off-by: Igor Raits <igor.raits@gmail.com>
Fixes https://pagure.io/fedora-rust/rust2rpm/issue/70.
The library semantic-version changed a lot during the last versions,
making the Metadata class very fragile.
A custom-made semantic version parsed, based on some Cargo specifics,
has been implemented to replace the old parser.
As a result of that, new features were implemented, like the support for
wildcard expressions, as documented in the Cargo book.
Fix: #93
We need to translate `x.y.z-foo` to `x.y.z~foo`. We also need to take
care that pre-release semantic versions are only only allowed to match
the same `x.y.z` series.
Imagine, that:
* A requires 0.6.0 <= X < 0.7.0
* B requires 0.9.0 <= X < 0.10.0
* C requires A and B
If we use Requires + Conflicts, then we just can't build or install
C, because sub-dependencies are conflicting between each other.
Proper syntax is: (X >= 0.6.0 with X < 0.7.0)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Before:
real 0m4.807s
user 0m3.817s
sys 0m0.920s
After:
real 0m1.236s
user 0m1.011s
sys 0m0.222s
Multiply by number of testcases we didn't implement yet and by
python versions we want to test on.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>