Backed out changeset 9f185bc37baf (bug 1885985) for causing failures on UpdateSettings. CLOSED TREE

This commit is contained in:
Natalia Csoregi 2024-04-17 22:35:59 +03:00
parent b883c45e01
commit 55ef2de90f
13 changed files with 22 additions and 157 deletions

View File

@ -151,19 +151,14 @@ class ArtifactJob(object):
# prepended.
#
# The entries in the archive, suitably renamed, will be extracted into `dist`.
@property
def _extra_archives(self):
return {
".xpt_artifacts.zip": {
"description": "XPT Artifacts",
"src_prefix": "",
"dest_prefix": "xpt_artifacts",
},
}
@property
def _extra_archive_suffixes(self):
return tuple(sorted(self._extra_archives.keys()))
_extra_archives = {
".xpt_artifacts.zip": {
"description": "XPT Artifacts",
"src_prefix": "",
"dest_prefix": "xpt_artifacts",
},
}
_extra_archive_suffixes = tuple(sorted(_extra_archives.keys()))
def __init__(
self,
@ -218,7 +213,7 @@ class ArtifactJob(object):
self._symbols_archive_suffix
):
yield name
elif name.endswith(self._extra_archive_suffixes):
elif name.endswith(ArtifactJob._extra_archive_suffixes):
yield name
else:
self.log(
@ -252,7 +247,7 @@ class ArtifactJob(object):
self._symbols_archive_suffix
):
return self.process_symbols_archive(filename, processed_filename)
if filename.endswith(self._extra_archive_suffixes):
if filename.endswith(ArtifactJob._extra_archive_suffixes):
return self.process_extra_archive(filename, processed_filename)
return self.process_package_artifact(filename, processed_filename)
@ -406,7 +401,7 @@ class ArtifactJob(object):
writer.add(destpath.encode("utf-8"), entry)
def process_extra_archive(self, filename, processed_filename):
for suffix, extra_archive in self._extra_archives.items():
for suffix, extra_archive in ArtifactJob._extra_archives.items():
if filename.endswith(suffix):
self.log(
logging.INFO,
@ -676,20 +671,6 @@ class MacArtifactJob(ArtifactJob):
),
)
@property
def _extra_archives(self):
extra_archives = super()._extra_archives
extra_archives.update(
{
".update_framework_artifacts.zip": {
"description": "Update-related macOS Framework Artifacts",
"src_prefix": "",
"dest_prefix": "update_framework_artifacts",
},
}
)
return extra_archives
@property
def paths_no_keep_path(self):
formatted = []
@ -1294,8 +1275,8 @@ class Artifacts(object):
zeroes = "0" * 40
hashes = []
for hg_hash_unstripped in hg_hash_list.splitlines():
hg_hash = hg_hash_unstripped.strip()
for hg_hash in hg_hash_list.splitlines():
hg_hash = hg_hash.strip()
if not hg_hash or hg_hash == zeroes:
continue
hashes.append(hg_hash)
@ -1407,8 +1388,8 @@ https://firefox-source-docs.mozilla.org/contributing/vcs/mercurial_bundles.html
if candidate_pushheads:
break
count = 0
for rev_unstripped in last_revs:
rev = rev_unstripped.rstrip()
for rev in last_revs:
rev = rev.rstrip()
if not rev:
continue
if rev not in candidate_pushheads:

View File

@ -110,9 +110,6 @@ GTEST_PACKAGE = $(PKG_BASENAME).gtest.tests.tar.gz
# `.xpt` artifacts: for use in artifact builds.
XPT_ARTIFACTS_ARCHIVE_BASENAME = $(PKG_BASENAME).xpt_artifacts
ifeq (Darwin, $(OS_ARCH))
UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME = $(PKG_BASENAME).update_framework_artifacts
endif # Darwin
ifneq (,$(wildcard $(DIST)/bin/application.ini))
BUILDID = $(shell $(PYTHON3) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)

View File

@ -109,17 +109,9 @@ endif # Darwin
ifndef MOZ_ARTIFACT_BUILDS
@echo 'Generating XPT artifacts archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)'
$(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(topobjdir)/config/makefiles/xpidl '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt')
ifeq (Darwin, $(OS_ARCH))
@echo 'Generating update-related macOS framework artifacts archive ($(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip)'
$(call py_action,zip $(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip,-C '$(ABS_DIST)/update_framework_artifacts' '$(ABS_DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.framework')
endif # Darwin
else
@echo 'Packaging existing XPT artifacts from artifact build into archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)'
$(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(ABS_DIST)/xpt_artifacts '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt')
ifeq (Darwin, $(OS_ARCH))
@echo 'Packaging existing update-related macOS framework artifacts from artifact build into archive ($(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip)'
$(call py_action,zip $(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(ABS_DIST)/update_framework_artifacts '$(ABS_DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.framework')
endif # Darwin
endif # MOZ_ARTIFACT_BUILDS
prepare-package: stage-package

View File

@ -394,10 +394,6 @@ endif
# Upload `.xpt` artifacts for use in artifact builds.
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)
# Upload update-related macOS framework artifacts for use in artifact builds.
ifeq ($(OS_ARCH),Darwin)
UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip)
endif # Darwin
ifndef MOZ_PKG_SRCDIR
MOZ_PKG_SRCDIR = $(topsrcdir)

View File

@ -1,20 +0,0 @@
# vim:set ts=8 sw=8 sts=8 noet:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
libs::
rm -rf $(FINAL_TARGET)/ChannelPrefs-localbuild.framework
$(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs-localbuild.framework
ifneq (,$(COMPILE_ENVIRONMENT))
cp $(FINAL_TARGET)/ChannelPrefs-localbuild ChannelPrefs
$(NSINSTALL) ChannelPrefs $(FINAL_TARGET)/ChannelPrefs-localbuild.framework
endif # COMPILE_ENVIRONMENT
ifneq (,$(MOZ_ARTIFACT_BUILDS))
$(NSINSTALL) $(DIST)/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs-localbuild.framework
endif # MOZ_ARTIFACT_BUILDS
$(NSINSTALL) $(srcdir)/../ChannelPrefs/Info.plist $(FINAL_TARGET)/ChannelPrefs-localbuild.framework/Resources
endif # MOZ_WIDGET_TOOLKIT

View File

@ -1,21 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Toolkit", "Application Update")
Framework("ChannelPrefs-localbuild")
FINAL_TARGET = "dist/update_framework_artifacts"
DEFINES["MOZ_UPDATE_CHANNEL_OVERRIDE"] = "default"
UNIFIED_SOURCES += [
"../ChannelPrefs/ChannelPrefs.mm",
]
OS_LIBS += [
"-framework Foundation",
]

View File

@ -6,13 +6,7 @@
#include "mozilla/HelperMacros.h"
#ifdef MOZ_UPDATE_CHANNEL_OVERRIDE
# define CHANNEL MOZ_UPDATE_CHANNEL_OVERRIDE
#else
# define CHANNEL MOZ_UPDATE_CHANNEL
#endif
NSString* ChannelPrefsGetChannel() {
return [NSString stringWithCString:MOZ_STRINGIFY(CHANNEL)
return [NSString stringWithCString:MOZ_STRINGIFY(MOZ_UPDATE_CHANNEL)
encoding:NSUTF8StringEncoding];
}

View File

@ -7,13 +7,8 @@ include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
libs::
rm -rf $(FINAL_TARGET)/ChannelPrefs.framework
$(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs.framework
ifneq (,$(COMPILE_ENVIRONMENT))
$(NSINSTALL) $(FINAL_TARGET)/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework
endif # COMPILE_ENVIRONMENT
ifneq (,$(MOZ_ARTIFACT_BUILDS))
$(NSINSTALL) $(DIST)/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework
endif # MOZ_ARTIFACT_BUILDS
$(NSINSTALL) $(srcdir)/Info.plist $(FINAL_TARGET)/ChannelPrefs.framework/Resources
endif # MOZ_WIDGET_TOOLKIT
rm -rf $(DIST)/bin/ChannelPrefs.framework
$(NSINSTALL) $(DIST)/bin/ChannelPrefs $(DIST)/bin/ChannelPrefs.framework
$(NSINSTALL) $(srcdir)/Info.plist $(DIST)/bin/ChannelPrefs.framework/Resources
endif

View File

@ -11,7 +11,6 @@ FINAL_LIBRARY = "xul"
DIRS += [
"ChannelPrefs",
"ChannelPrefs-localbuild",
]
EXPORTS += [

View File

@ -26,11 +26,6 @@ libs::
$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
$(NSINSTALL) $(DIST)/bin/org.mozilla.updater $(DIST)/bin/updater.app/Contents/MacOS
$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/Frameworks
ifneq (,$(COMPILE_ENVIRONMENT))
$(NSINSTALL) $(DIST)/bin/UpdateSettings $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework
endif # COMPILE_ENVIRONMENT
ifneq (,$(MOZ_ARTIFACT_BUILDS))
$(NSINSTALL) $(DIST)/update_framework_artifacts/UpdateSettings-localbuild.framework/UpdateSettings $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework
endif # MOZ_ARTIFACT_BUILDS
$(NSINSTALL) $(srcdir)/macos-frameworks/UpdateSettings/Info.plist $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework/Resources
endif

View File

@ -1,20 +0,0 @@
# vim:set ts=8 sw=8 sts=8 noet:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
libs::
rm -rf $(FINAL_TARGET)/UpdateSettings-localbuild.framework
$(NSINSTALL) -D $(FINAL_TARGET)/UpdateSettings-localbuild.framework
ifneq (,$(COMPILE_ENVIRONMENT))
cp $(FINAL_TARGET)/UpdateSettings-localbuild UpdateSettings
$(NSINSTALL) UpdateSettings $(FINAL_TARGET)/UpdateSettings-localbuild.framework
endif # COMPILE_ENVIRONMENT
ifneq (,$(MOZ_ARTIFACT_BUILDS))
$(NSINSTALL) $(DIST)/update_framework_artifacts/UpdateSettings-localbuild.framework/UpdateSettings $(FINAL_TARGET)/UpdateSettings-localbuild.framework
endif # MOZ_ARTIFACT_BUILDS
$(NSINSTALL) $(srcdir)/../UpdateSettings/Info.plist $(FINAL_TARGET)/UpdateSettings-localbuild.framework/Resources
endif # MOZ_WIDGET_TOOLKIT

View File

@ -1,18 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Framework("UpdateSettings-localbuild")
FINAL_TARGET = "dist/update_framework_artifacts"
DEFINES["ACCEPTED_MAR_CHANNEL_IDS"] = '""'
UNIFIED_SOURCES += [
"../UpdateSettings/UpdateSettings.mm",
]
OS_LIBS += [
"-framework Foundation",
]

View File

@ -7,12 +7,7 @@
with Files("**"):
BUG_COMPONENT = ("Toolkit", "Application Update")
DIRS += [
"UpdateSettings",
"UpdateSettings-localbuild",
"UpdateSettings-WrongChannel",
"UpdateSettings-xpcshell",
]
DIRS += ["UpdateSettings", "UpdateSettings-xpcshell", "UpdateSettings-WrongChannel"]
EXPORTS += [
"UpdateSettingsUtil.h",