author | Mike Hommey <mh+mozilla@glandium.org> |
Wed, 20 Feb 2013 16:48:58 +0100 | |
changeset 122464 | 3ac36d8b2489eedfee620d64e9a71fad0532d253 |
parent 122463 | fec94a52b86faac4ca3a2ee42dadf1dd61849fed |
child 122465 | 9111f2f9bd505f106a12af16ff958059e0adc085 |
push id | 24342 |
push user | ryanvm@gmail.com |
push date | Thu, 21 Feb 2013 13:05:06 +0000 |
treeherder | mozilla-central@702d2814efbf [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | rstrong, bhearsum |
bugs | 841094 |
milestone | 22.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/tools/update-packaging/common.sh +++ b/tools/update-packaging/common.sh @@ -42,42 +42,38 @@ make_add_instruction() { # Used to log to the console if [ $2 ]; then forced=" (forced)" else forced= fi - is_extension=$(echo "$f" | grep -c 'extensions/.*/') + is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/') if [ $is_extension = "1" ]; then # Use the subdirectory of the extensions folder as the file to test # before performing this add instruction. - testdir=$(echo "$f" | sed 's/\(extensions\/[^\/]*\)\/.*/\1/') + testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') notice " add-if: $f$forced" echo "add-if \"$testdir\" \"$f\"" else notice " add: $f$forced" echo "add \"$f\"" fi } make_patch_instruction() { f="$1" - is_extension=$(echo "$f" | grep -c 'extensions/.*/') - is_search_plugin=$(echo "$f" | grep -c 'searchplugins/.*') + is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/') if [ $is_extension = "1" ]; then # Use the subdirectory of the extensions folder as the file to test # before performing this add instruction. - testdir=$(echo "$f" | sed 's/\(extensions\/[^\/]*\)\/.*/\1/') + testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') notice " patch-if: $f" echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" - elif [ $is_search_plugin = "1" ]; then - notice " patch-if: $f" - echo "patch-if \"$f\" \"$f.patch\" \"$f\"" else notice " patch: $f" echo "patch \"$f.patch\" \"$f\"" fi } append_remove_instructions() { dir="$1"
--- a/tools/update-packaging/make_incremental_updates.py +++ b/tools/update-packaging/make_incremental_updates.py @@ -32,57 +32,47 @@ class PatchInfo: self.archive_files=[] self.manifestv1=[] self.manifestv2=[] self.file_exclusion_list=file_exclusion_list self.path_exclusion_list=path_exclusion_list def append_add_instruction(self, filename): """ Appends an add instruction for this patch. - if the filename starts with extensions/ adds an add-if instruction - to test the existence of the subdirectory. This was ported from - mozilla/tools/update-packaging/common.sh/make_add_instruction + if the filename starts with distribution/extensions/ adds an add-if + instruction to test the existence of the subdirectory. This was + ported from mozilla/tools/update-packaging/common.sh's + make_add_instruction. """ - if filename.startswith("extensions/"): + m = re.match("((?:|.*/)distribution/extensions)/", filename): + if m: # Directory immediately following extensions is used for the test - testdir = "extensions/"+filename.split("/")[1] - self.manifestv1.append('add-if "'+testdir+'" "'+filename+'"') - self.manifestv2.append('add-if "'+testdir+'" "'+filename+'"') - elif filename.startswith("Contents/MacOS/extensions/"): - testdir = "Contents/MacOS/extensions/"+filename.split("/")[3] + testdir = m.group(1) self.manifestv1.append('add-if "'+testdir+'" "'+filename+'"') self.manifestv2.append('add-if "'+testdir+'" "'+filename+'"') else: self.manifestv1.append('add "'+filename+'"') self.manifestv2.append('add "'+filename+'"') def append_patch_instruction(self, filename, patchname): """ Appends an patch instruction for this patch. filename = file to patch patchname = patchfile to apply to file - if the filename starts with extensions/ adds a patch-if instruction - to test the existence of the subdirectory. - if the filename starts with searchplugins/ add a add-if instruction for the filename + if the filename starts with distribution/extensions/ adds a + patch-if instruction to test the existence of the subdirectory. This was ported from - mozilla/tools/update-packaging/common.sh/make_patch_instruction + mozilla/tools/update-packaging/common.sh's make_patch_instruction. """ - if filename.startswith("extensions/"): - testdir = "extensions/"+filename.split("/")[1] + m = re.match("((?:|.*/)distribution/extensions)/", filename): + if m: + testdir = m.group(1) self.manifestv1.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"') self.manifestv2.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"') - elif filename.startswith("Contents/MacOS/extensions/"): - testdir = "Contents/MacOS/extensions/"+filename.split("/")[3] - self.manifestv1.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"') - self.manifestv2.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"') - elif (filename.startswith("searchplugins/") or - filename.startswith("Contents/MacOS/searchplugins/")): - self.manifestv1.append('patch-if "'+filename+'" "'+patchname+'" "'+filename+'"') - self.manifestv2.append('patch-if "'+filename+'" "'+patchname+'" "'+filename+'"') else: self.manifestv1.append('patch "'+patchname+'" "'+filename+'"') self.manifestv2.append('patch "'+patchname+'" "'+filename+'"') def append_remove_instruction(self, filename): """ Appends an remove instruction for this patch. This was ported from mozilla/tools/update-packaging/common.sh/make_remove_instruction
--- a/tools/update-packaging/test/common.sh +++ b/tools/update-packaging/test/common.sh @@ -39,42 +39,38 @@ make_add_instruction() { # Used to log to the console if [ $2 ]; then forced=" (forced)" else forced= fi - is_extension=$(echo "$f" | grep -c 'extensions/.*/') + is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/') if [ $is_extension = "1" ]; then # Use the subdirectory of the extensions folder as the file to test # before performing this add instruction. - testdir=$(echo "$f" | sed 's/\(extensions\/[^\/]*\)\/.*/\1/') + testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') notice " add-if: $f$forced" echo "add-if \"$testdir\" \"$f\"" else notice " add: $f$forced" echo "add \"$f\"" fi } make_patch_instruction() { f="$1" - is_extension=$(echo "$f" | grep -c 'extensions/.*/') - is_search_plugin=$(echo "$f" | grep -c 'searchplugins/.*') + is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/') if [ $is_extension = "1" ]; then # Use the subdirectory of the extensions folder as the file to test # before performing this add instruction. - testdir=$(echo "$f" | sed 's/\(extensions\/[^\/]*\)\/.*/\1/') + testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') notice " patch-if: $f" echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" - elif [ $is_search_plugin = "1" ]; then - notice " patch-if: $f" - echo "patch-if \"$f\" \"$f.patch\" \"$f\"" else notice " patch: $f" echo "patch \"$f.patch\" \"$f\"" fi } append_remove_instructions() { dir="$1"