From 3c22b4c56f688d485a71f3735d86afddf4a1f74b Mon Sep 17 00:00:00 2001 From: Stephen King Date: Thu, 30 Oct 2025 08:48:42 +0000 Subject: [PATCH] Bug 1991990: Update MSIX Packaging Branding a=pascalc DONTBUILD Thunderbird already uses a " Beta" suffix in its branding. Only add a " Beta" suffix if one does not already exist. Also adds an esr channel with a corresponding " ESR" suffix if one does not aleady exist in the products branding. Original Revision: https://phabricator.services.mozilla.com/D268806 Differential Revision: https://phabricator.services.mozilla.com/D270627 --- python/mozbuild/mozbuild/mach_commands.py | 2 +- python/mozbuild/mozbuild/repackaging/msix.py | 25 ++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 809a70dab350..e777bc855a27 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -2829,7 +2829,7 @@ def repackage_msi( @CommandArgument( "--channel", type=str, - choices=["official", "beta", "aurora", "nightly", "unofficial"], + choices=["official", "beta", "esr", "aurora", "nightly", "unofficial"], help="Release channel.", ) @CommandArgument( diff --git a/python/mozbuild/mozbuild/repackaging/msix.py b/python/mozbuild/mozbuild/repackaging/msix.py index 2caa7fee11ac..d7f6dc92de40 100644 --- a/python/mozbuild/mozbuild/repackaging/msix.py +++ b/python/mozbuild/mozbuild/repackaging/msix.py @@ -354,6 +354,7 @@ def repackage_msix( if channel not in ( "official", "beta", + "esr", "aurora", "nightly", "unofficial", @@ -412,9 +413,17 @@ def repackage_msix( if not displayname: displayname = f"Mozilla {first}" + # Release (official) and Beta share branding. Differentiate Beta a little bit. if channel == "beta": - # Release (official) and Beta share branding. Differentiate Beta a little bit. - displayname += " Beta" + suffix = " Beta" + if not displayname.endswith(suffix): + displayname += suffix + + elif channel == "esr": + # Release (official) and ESR share branding. Differentiate ESR a little bit. + suffix = " ESR" + if not displayname.endswith(suffix): + displayname += suffix second = next(values) vendor = vendor or second @@ -472,9 +481,17 @@ def repackage_msix( _, _, brandFullName = brandFullName.partition("=") brandFullName = brandFullName.strip() + # Release (official) and Beta share branding. Differentiate Beta a little bit. if channel == "beta": - # Release (official) and Beta share branding. Differentiate Beta a little bit. - brandFullName += " Beta" + suffix = " Beta" + if not brandFullName.endswith(suffix): + brandFullName += suffix + + elif channel == "esr": + # Release (official) and ESR share branding. Differentiate ESR a little bit. + suffix = " ESR" + if not brandFullName.endswith(suffix): + brandFullName += suffix branding = get_branding( use_official_branding, topsrcdir, build_app, unpack_finder, log