if 'dpkg: error' in dupe_sig and line.startswith(' '): if 'trying to overwrite' in line: conflict_pkg = re.search('in package (.*) ', line) if conflict_pkg and not apport.packaging.is_distro_package(conflict_pkg.group(1)): report['UnreportableReason'] = _('An Ubuntu package has a file conflict with a package that is not a genuine Ubuntu package') add_tag(report, 'package-conflict')
Well, this logic already exists in apport:
if 'dpkg: error' in dupe_sig and line.startswith(' '):
if 'trying to overwrite' in line:
conflict_ pkg = re.search('in package (.*) ', line)
if conflict_pkg and not apport. packaging. is_distro_ package( conflict_ pkg.group( 1)):
report[ 'UnreportableRe ason'] = _('An Ubuntu package has a file conflict with a package that is not a genuine Ubuntu package')
add_ tag(report, 'package-conflict')