# HG changeset patch # User Mathias De Mare # Date 1549527121 -3600 # Node ID 8f0e8b1798425fdfec0390bba3a5e5a857bd0921 # Parent 87a6e3c953e045d92147925fc71aad7c327fdbfd packaging: modify rc detection to work with X.Yrc instead of X.Y-rc rc detection on CentOS failed without this change, resulting in upgrades from 4.9rc to 4.9 not working (4.9rc was considered more recent than 4.9). Differential Revision: https://phab.mercurial-scm.org/D5876 diff -r 87a6e3c953e0 -r 8f0e8b179842 contrib/packaging/packagelib.sh --- a/contrib/packaging/packagelib.sh Tue Feb 05 20:50:54 2019 -0500 +++ b/contrib/packaging/packagelib.sh Thu Feb 07 09:12:01 2019 +0100 @@ -28,9 +28,9 @@ distance='' node='' fi - if echo $hgversion | grep -- '-' > /dev/null 2>&1; then - version=`echo $hgversion | cut -d- -f1` - type=`echo $hgversion | cut -d- -f2` + if echo $hgversion | grep -E -- '[0-9]\.[0-9](\.[0-9])?rc' > /dev/null 2>&1; then + version=`echo $hgversion | cut -d'r' -f1` + type="rc`echo $hgversion | cut -d'c' -f2-`" else version=$hgversion type=''