diff --git a/apport/crashdb_impl/launchpad.py b/apport/crashdb_impl/launchpad.py index 42b96810a..c1bd59d74 100644 --- a/apport/crashdb_impl/launchpad.py +++ b/apport/crashdb_impl/launchpad.py @@ -1141,9 +1141,11 @@ def _enforce_privacy_for_distro_reports( # FIXME: ugly hack until LP has a real crash db if "DistroRelease" not in report: return - if arch and ( - "VmCore" in report or "CoreDump" in report or "LaunchpadPrivate" in report - ): + + if "LaunchpadPrivate" in report: + hdr["Private"] = "yes" + + if arch and ("VmCore" in report or "CoreDump" in report): hdr["Private"] = "yes" hdr["Subscribers"] = report.get( "LaunchpadSubscribe", self.options.get("initial_subscriber", "apport") diff --git a/tests/unit/test_launchpad.py b/tests/unit/test_launchpad.py index 128e9e964..5d2ccd319 100644 --- a/tests/unit/test_launchpad.py +++ b/tests/unit/test_launchpad.py @@ -9,6 +9,8 @@ """Unit tests for apport.crash_impl.launchpad""" +import re + from apport.crashdb_impl.launchpad import CrashDatabase from apport.report import Report @@ -88,3 +90,4 @@ def test_private_bug_headers(): headers = crashdb._generate_upload_headers(report) assert headers.get("Private") == "yes" + assert not re.match(r"need-[a-z0-9]-retrace", headers.get("Tags", ""))