summaryrefslogtreecommitdiffstats
path: root/tools/update-verify/release/compare-directories.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtools/update-verify/release/compare-directories.py38
1 files changed, 21 insertions, 17 deletions
diff --git a/tools/update-verify/release/compare-directories.py b/tools/update-verify/release/compare-directories.py
index ea70d79b31..714f02a66d 100755
--- a/tools/update-verify/release/compare-directories.py
+++ b/tools/update-verify/release/compare-directories.py
@@ -29,7 +29,6 @@ TRANSFORMS = [
# this can be removed once each channel has a watershed above 59.0b2 (from bug 1431342)
"files": [
"defaults/pref/channel-prefs.js",
- "Contents/Resources/defaults/pref/channel-prefs.js",
],
"channel_prefix": ["aurora", "beta", "release", "esr"],
"side": "source",
@@ -39,7 +38,6 @@ TRANSFORMS = [
# updates from a beta to an RC build, the latter specifies the release channel
"files": [
"defaults/pref/channel-prefs.js",
- "Contents/Resources/defaults/pref/channel-prefs.js",
],
"channel_prefix": ["beta"],
"side": "target",
@@ -52,7 +50,6 @@ TRANSFORMS = [
# updates from an RC to a beta build
"files": [
"defaults/pref/channel-prefs.js",
- "Contents/Resources/defaults/pref/channel-prefs.js",
],
"channel_prefix": ["beta"],
"side": "source",
@@ -69,7 +66,6 @@ TRANSFORMS = [
# to break before applying this transform.
"files": [
"defaults/pref/channel-prefs.js",
- "Contents/Resources/defaults/pref/channel-prefs.js",
],
"channel_prefix": ["aurora", "beta", "release", "esr"],
"side": "target",
@@ -80,7 +76,7 @@ TRANSFORMS = [
# updates from a beta to an RC build, the latter specifies the release channel
# on mac, we actually have both files. The second location is the real
# one but we copy to the first to run the linux64 updater
- "files": ["update-settings.ini", "Contents/Resources/update-settings.ini"],
+ "files": ["update-settings.ini"],
"channel_prefix": ["beta"],
"side": "target",
"substitution": [
@@ -88,20 +84,20 @@ TRANSFORMS = [
"ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release\n",
],
},
- {
- # updates from an RC to a beta build
- # on mac, we only need to modify the legit file this time. unpack_build
- # handles the copy for the updater in both source and target
- "files": ["Contents/Resources/update-settings.ini"],
- "channel_prefix": ["beta"],
- "side": "source",
- "substitution": [
- "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-release\n",
- "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release\n",
- ],
- },
]
+# Files that are expected to be different, but cannot be transformed to get a useful diff.
+# This should generally only be used for files that have unpredictable contents, eg:
+# things that are signed but not updated.
+IGNORE_FILES = (
+ "Contents/MacOS/updater.app/Contents/Frameworks/UpdateSettings.framework/Resources/Info.plist",
+ "Contents/MacOS/updater.app/Contents/Frameworks/UpdateSettings.framework/_CodeSignature/CodeResources",
+ "Contents/MacOS/updater.app/Contents/Frameworks/UpdateSettings.framework/UpdateSettings",
+ "Contents/Frameworks/ChannelPrefs.framework/Resources/Info.plist",
+ "Contents/Frameworks/ChannelPrefs.framework/_CodeSignature/CodeResources",
+ "Contents/Frameworks/ChannelPrefs.framework/ChannelPrefs",
+)
+
def walk_dir(path):
all_files = []
@@ -170,6 +166,14 @@ def compare_common_files(files, channel, source_dir, target_dir):
source_file
) != hash_file(target_file):
logging.info("Difference found in {}".format(filename))
+ if filename in IGNORE_FILES:
+ logging.info(
+ "Ignoring difference in {} because it is listed in IGNORE_FILES".format(
+ filename
+ )
+ )
+ continue
+
file_contents = {
"source": open(source_file).readlines(),
"target": open(target_file).readlines(),