Accept 2.5 as package version

Thermald release tarballs do not generally contain the .0, while the
printed releaes may or may not contain a .0. i.e. we can get a mismatch.
Accpet a missing .0 on either the RPM (/tarball) version or the output
version.

Related: #2040081
This commit is contained in:
Benjamin Berg 2022-07-25 15:59:46 +02:00
parent 1cd3f5b145
commit 3f00b7a868
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ set -ex
rpmversion=$(rpm -q --queryformat '%{VERSION}' thermald)
version=$(thermald --version)
if [ "$version" != "$rpmversion" -a "$version.0" != "$rpmversion" ]; then
if [ "$version" != "$rpmversion" -a "$version.0" != "$rpmversion" -a "$version" != "$rpmversion.0" ]; then
echo "reported thermald version (${version}) does not match rpm version (${rpmversion})"
exit 1
fi

View File

@ -8,7 +8,7 @@
Name: thermald
Version: 2.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Thermal Management daemon
# thd_cdev_modem.{cpp,h} is currently GPLv2 only
@ -251,6 +251,10 @@ exit 0
%changelog
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-3
- Accept 2.5 as package version
Related: #2040081
* Mon Jul 25 2022 Benjamin Berg <bberg@redhat.com> - 2.5-2
- Fix version test script
Related: #2040081