ericm / yup

Arch Linux AUR Helper with ncurses functionality and better searching and sorting
https://aur.archlinux.org/packages/yup
GNU General Public License v3.0
139 stars 7 forks source link

Fixed newer packages mistakenly considered as older #30

Closed Ballasi closed 4 years ago

Ballasi commented 4 years ago

I had this prompt while using the program today.

image

After investigating the code, I realized that the number after the .r is being ignored.

With this exact setup (where oldVersion and newVersion are in the form of 456.r4x-1), the oldVer and newVer arrays becomes the same, and returns false.

I made a simple fix for now, but it probably needs a deeper look. I couldn't find any reliant package version conventions online, and I am not sure how the program should behave if the .rXX is being added or removed. For now, I just checked if it existed on both versions.