Handle all-zero versions without crashing
From https://github.com/rpm-software-management/rpm/pull/1184
This commit is contained in:
parent
783dcc7147
commit
0ec8581037
@ -1,7 +1,7 @@
|
||||
Name: python-rpm-generators
|
||||
Summary: Dependency generators for Python RPMs
|
||||
Version: 11
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
|
||||
# Originally all those files were part of RPM, so license is kept here
|
||||
License: GPLv2+
|
||||
@ -45,6 +45,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} pythondistdeps.py
|
||||
%{_rpmconfigdir}/pythondistdeps.py
|
||||
|
||||
%changelog
|
||||
* Mon Apr 20 2020 Gordon Messmer <gordon.messmer@gmail.com> - 11-3
|
||||
- Handle all-zero versions without crashing
|
||||
|
||||
* Tue Apr 07 2020 Miro Hrončok <mhroncok@redhat.com> - 11-2
|
||||
- Use dynamic %%_prefix value when matching files for python(abi) provides
|
||||
- Sync with upstream RPM dist generator
|
||||
|
@ -44,7 +44,7 @@ class RpmVersion():
|
||||
rpm_epoch = str(self.epoch) + ':'
|
||||
else:
|
||||
rpm_epoch = ''
|
||||
while self.version[-1] == 0:
|
||||
while len(self.version) > 1 and self.version[-1] == 0:
|
||||
self.version.pop()
|
||||
rpm_version = '.'.join(str(x) for x in self.version)
|
||||
if self.pre:
|
||||
|
Loading…
Reference in New Issue
Block a user