diff --git a/apport/crashdb_impl/launchpad.py b/apport/crashdb_impl/launchpad.py index e2378f137..c011e093d 100644 --- a/apport/crashdb_impl/launchpad.py +++ b/apport/crashdb_impl/launchpad.py @@ -41,6 +41,7 @@ import apport.crashdb import apport.logging import apport.report +import problem_report from apport.packaging_impl import impl as packaging DEFAULT_LAUNCHPAD_INSTANCE = "production" @@ -55,7 +56,7 @@ def filter_filename(attachments): apport.logging.error("Broken attachment on bug, ignoring") continue name = f.filename - if name.endswith(".txt") or name.endswith(".gz"): + if name.endswith(".txt") or name.endswith(".gz") or name.endswith(".zst"): yield f @@ -374,6 +375,10 @@ def download(self, crash_id): raise attachment.seek(0) report[key] = attachment.read() + elif ext == ".zst": + report[key] = problem_report.CompressedValue( + name=key, compressed_value=attachment.read() + ) else: raise NotImplementedError( f"Unknown attachment type: {attachment.filename}" @@ -494,7 +499,7 @@ def update_traces(self, crash_id, report, comment=""): # remove core dump if stack trace is usable if report.has_useful_stacktrace(): for a in bug.attachments: - if a.title == "CoreDump.gz": + if a.title in {"CoreDump.gz", "CoreDump.zst"}: try: a.removeFromBug() except HTTPError: @@ -773,6 +778,7 @@ def close_duplicate(self, report, crash_id, master_id): for a in bug.attachments: if a.title in { "CoreDump.gz", + "CoreDump.zst", "Stacktrace.txt", "ThreadStacktrace.txt", "ProcMaps.txt", @@ -949,7 +955,7 @@ def mark_retrace_failed( ) for a in bug.attachments: - if a.title == "CoreDump.gz": + if a.title in {"CoreDump.gz", "CoreDump.zst"}: try: a.removeFromBug() except HTTPError: