~apport-hackers/apport/trunk

« back to all changes in this revision

Viewing changes to apport/sandboxutils.py

  • Committer: Brian Murray
  • Date: 2020-04-13 21:19:56 UTC
  • Revision ID: brian@canonical.com-20200413211956-510gcw5g2y6ki1ox
Hack around systemd's systemctl crashes not being retraceable

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
            pkg = apport.packaging.get_file_package(report[path], True, pkgmap_cache_dir,
227
227
                                                    release=report['DistroRelease'],
228
228
                                                    arch=report.get('Architecture'))
 
229
            # Because of UsrMerge the two systemctl's may share the same
 
230
            # location, however since systemd and systemctl conflict we can
 
231
            # assume that if the SourcePackage was set to systemd it is
 
232
            # correct. For an example see LP: #1872211.
 
233
            if pkg == 'systemctl':
 
234
                if report['SourcePackage'] == 'systemd':
 
235
                    report['ExecutablePath'] = '/bin/systemctl'
 
236
                    pkg = 'systemd'
229
237
            if pkg:
230
238
                apport.log('Installing extra package %s to get %s' % (pkg, path), log_timestamps)
231
239
                pkgs.append((pkg, pkg_versions.get(pkg)))