Py2RPM helper: always return all names from conversion

Many parts of anvil rely on the fact that convert_names_to_rpm returns
same number of rpms names and in same order as it was given. This change
ensures that this is the case.

Change-Id: Id6107f8b8558be52d531d413e44325c8fb031371
This commit is contained in:
Ivan A. Melnikov
2013-12-26 23:24:42 +02:00
parent 54a2e4f13b
commit bb679fe3ea

View File

@@ -77,8 +77,9 @@ class Helper(object):
positions = sorted([p for p in positions if p != -1])
if positions:
line = line[0:positions[0]].strip()
if line and line not in rpm_names:
rpm_names.append(line)
rpm_names.append(line)
assert len(python_names) == len(rpm_names), (
"Some package names were lost during conversion")
return rpm_names
def build_all_srpms(self, package_files, tracewriter, jobs):