Closed Thr3d closed 2 years ago
So, instead of trying to "fix" whatever the LooseVersion class (from Python distutils) thinks is unparseable, I'm taking a more "holistic" approach: if LooseVersion causes an exception, I'll ask the oracle (e.g. zypper vcmp). Since it's very infrequent (I've only seen it happen with 4 or 5 packages over thousands in my tests), this should be okay.
This should clear out inconsistencies when comparing between marvelous version strings like these: 7.2.1_k4.12.14_95.13-4.6.2 and 7.2.1_k4.12.14_95.71-4.12.1 9.3.1+git1296-1.6.1 and 9.2.1+r275327-1.3.7 8.2.1+r264010-1.3.7 and 10.3.0+git1587-1.6.4 15.4-3.29.1 and 15+git47-3.8.1
you can see it working if -v is specified:
latest version for shim on product ID 1939 is 15.4-3.32.1 in repository Basesystem Module 15 SP2 x86_64
dont know how to compare: 15.4-3.32.1 and 15+git47-3.13.1, lets ask the oracle
the oracle says: 15.4-3.32.1 is newer
e20ca18 May have broken some of the comparing, wasn't seeing these before hand.