~ubuntu-branches/ubuntu/oneiric/apport/oneiric-updates

« back to all changes in this revision

Viewing changes to apport/crashdb_impl/launchpad.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Brian Murray, Martin Pitt
  • Date: 2011-09-14 08:29:03 UTC
  • mfrom: (148.1.46)
  • Revision ID: package-import@ubuntu.com-20110914082903-vmd5ir80swqtiar9
Tags: 1.23-0ubuntu1
[ Brian Murray ]
* data/package-hooks/source_ubiquity.py: Do not create a DuplicateSignature
  for bugs with a Traceback included as it is redundant

[ Martin Pitt ]
* New upstream release:
  - crashdb.py, crash-digger, dupdb-admin: Drop the concept of "duplicate DB
    consolidation". Such massive queries cause timeouts with e. g.
    Launchpad. Instead, update the status of potential master bugs in the
    crash DB whenever check_duplicate() is called. Note that this does not
    affect Ubuntu itself, just the retracers in the data center.
  - launchpad.py: Fix crash in close_duplicate() if master bug was already
    marked as a duplicate of the examined bug.
  - problem_report.py, load(): Fix missing last character if the last line
    in a multi-line field is not terminated with a newline.
  - launchpad.py: Fix test_marking_python_task_mangle() check to work with
    current Launchpad.
  - apport-retrace: If the user did not specify a --cache directory, create
    a shared one instead of letting the two install_packages() calls create
    their own. This ensures that the apt and dpkg status is up to date, and
    avoids downloading the package indexes multiple times. (LP: #847951)
  - apport-retrace: Give proper error mesage instead of AssertionError crash
    if a report does not contain standard Apport format data. (LP: #843221)
  - fileutils.py, get_new_reports(): Fix crash if report file disappears in
    the middle of the operation. (LP: #640216)
  - apport/ui.py, load_report(): Intercept another case of broken report
    files. (LP: #445142)
  - apport/report.py, standard_title(): Escape regular expression control
    characters in custom exception names. (LP: #762998)
* data/package-hooks/source_ubiquity.py: Fix crash if
  prepare_duplicate_signature() does not return anything. (LP: #843911)
* debian/control: Bump Standards-Version to 3.9.2 (no changes necessary).

Show diffs side-by-side

added added

removed removed

Lines of Context:
629
629
            master = self.launchpad.bugs[master_id]
630
630
            if master.duplicate_of:
631
631
                master = master.duplicate_of
 
632
                if master.id == id:
 
633
                    # this happens if the bug was manually duped to a newer one
 
634
                    apport.warning('Bug %i was manually marked as a dupe of newer bug %i, not closing as duplicate', 
 
635
                            id, master_id)
 
636
                    return
632
637
            
633
638
            for a in bug.attachments:
634
639
                if a.title in ('CoreDump.gz', 'Stacktrace.txt',
1571
1576
            # package name
1572
1577
            b = self.crashdb.launchpad.bugs[python_report]
1573
1578
            t = b.bug_tasks[0]
1574
 
            t.target = self.crashdb.launchpad.distributions['ubuntu'].getSourcePackage(name='bash')
1575
 
            t.status = 'Invalid'
 
1579
            t.target = self.crashdb.launchpad.distributions['ubuntu']
1576
1580
            t.lp_save()
1577
1581
            b.addTask(target=self.crashdb.launchpad.projects['coreutils'])
1578
 
            b.addTask(target=self.crashdb.launchpad.distributions['ubuntu'])
1579
1582
 
1580
1583
            self.crashdb._mark_dup_checked(python_report, self.ref_report)
1581
1584
 
1590
1593
            self.assertEqual(b.bug_tasks[0].status, 'New')
1591
1594
 
1592
1595
            # package-less distro task should have package name fixed
1593
 
            self.assertEqual(b.bug_tasks[2].bug_target_name, 'coreutils (Ubuntu)')
1594
 
            self.assertEqual(b.bug_tasks[2].status, 'New')
1595
 
 
1596
 
            # invalid bash task should be unmodified
1597
 
            self.assertEqual(b.bug_tasks[1].bug_target_name, 'bash (Ubuntu)')
1598
 
            self.assertEqual(b.bug_tasks[1].status, 'Invalid')
1599
 
 
1600
 
            # the invalid task should not confuse get_fixed_version()
 
1596
            self.assertEqual(b.bug_tasks[1].bug_target_name, 'coreutils (Ubuntu)')
 
1597
            self.assertEqual(b.bug_tasks[1].status, 'New')
 
1598
 
 
1599
            # should not confuse get_fixed_version()
1601
1600
            self.assertEqual(self.crashdb.get_fixed_version(python_report),
1602
1601
                    None)
1603
1602