Tatsh / livecheck

Tool to update ebuilds.
https://livecheck.readthedocs.io/en/latest/
MIT License
3 stars 2 forks source link

Is use_vercmp necessary? #206

Open inode64 opened 1 week ago

inode64 commented 1 week ago

I've been reviewing the code and I see that there is a use_vercmp flag. What's the point of not using vercmp? because in the end it is important to correctly determine the versions, otherwise the portage can cause problems

Tatsh commented 1 week ago

If the version string provided by upstream is something vercmp() can handle then use_vercmp is True.

It won't be true for cases like comparing hashes where the only check there is to see if they are different.

inode64 commented 1 week ago

Yes, I noticed that some ebuilds used hash instead of normal version That is why in pull request #205 https://github.com/Tatsh/livecheck/pull/205/files#diff-aa05bf77c6475621550b2c1514165c569eac97012c3d020c4f41b51a683716b1R68-R80

I have added a function to determine if the version is a hash and not perform the sanitize You could use that same function to automatically determine if you can use vercmp or compare the hash