The old version detector in `upload.sh` does not support semanting versioning
When multiple versions of the same package have been built and one tries to upload them,
upload.sh will warn that it discovered old versions of the packages and propose to delete the oldest versions.
upload.sh decides which oldest package it is by using a simple alphanumerical sort. This causes problems when, for example, a pkg with version 5.9 and 5.10 exist in the local repository. The newer version will be proposed for deletion.
Steps to reproduce:
- pick a package, any package
You'll get something similar to this:
:: There are old version of the following package(s) in the local repository: python-pyqt5-common-5.10-1-x86_64.pkg.tar.xz python2-pyqt5-5.9.1-2-x86_64.pkg.tar.xz python-pyqt5-common-5.9.1-2-x86_64.pkg.tar.xz python3-pyqt5-5.10-1-x86_64.pkg.tar.xz python2-pyqt5-5.10-1-x86_64.pkg.tar.xz python3-pyqt5-5.9.1-2-x86_64.pkg.tar.xz rm: remove regular file '/chakra/_repo/testing/python-pyqt5-common-5.10-1-x86_64.pkg.tar.xz'? n rm: remove regular file '/chakra/_repo/testing/python2-pyqt5-5.10-1-x86_64.pkg.tar.xz'? n rm: remove regular file '/chakra/_repo/testing/python3-pyqt5-5.10-1-x86_64.pkg.tar.xz'? n rm: remove regular file '/chakra/_repo/testing/python-pyqt5-common-5.10-1-x86_64.pkg.tar.xz.sig'? n rm: remove regular file '/chakra/_repo/testing/python2-pyqt5-5.10-1-x86_64.pkg.tar.xz.sig'? n rm: remove regular file '/chakra/_repo/testing/python3-pyqt5-5.10-1-x86_64.pkg.tar.xz.sig'? n