bug(ansible/sbin/make_changelog) do not failed is a package is view as already set

close #9
This commit is contained in:
egarette@silique.fr 2023-07-28 08:43:25 +02:00
parent d0aaf99890
commit cebb8f970b

View file

@ -38,12 +38,13 @@ def read_dnf_pkg_file(os_name, filename1, filename2):
sp_line = pkg_line.strip().split()
if len(sp_line) < idx_version[fidx] + 1:
continue
if sp_line[idx_pkg[fidx]] in pkgs:
raise Exception(f'package already set {sp_line[0]}?')
pkg = sp_line[idx_pkg[fidx]]
version = sp_line[idx_version[fidx]]
#if pkg in pkgs:
# raise Exception(f'package already set {pkg}?')
if os_name == 'debian' and version.startswith('('):
version = version[1:]
pkgs[sp_line[idx_pkg[fidx]]] = version
pkgs[pkg] = version
return pkgs