commit 769e682313bdd3ea26bdbc492c3158e1b0698c28
Author: Georg Koppen <[email protected]>
Date:   Wed Sep 9 14:04:54 2015 +0000

    fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.
    
    This is part of the fix for bug 16909. We need to adapt our update
    packaging tools to cope with the HTTPS Everywhere extension ID change
    introduced by version 5.1.0.
---
 tools/update-packaging/make_full_update.sh        |    5 ++++-
 tools/update-packaging/make_incremental_update.sh |   13 ++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/update-packaging/make_full_update.sh 
b/tools/update-packaging/make_full_update.sh
index 62baf4c..3578ae4 100755
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -11,7 +11,10 @@
 . $(dirname "$0")/common.sh
 
 # TODO: it would be better to pass this as a command line option.
-directories_to_remove='TorBrowser/Data/Browser/profile.default/extensions/[email protected]'
+# Make sure we delete the pre 5.1.0 HTTPS Everywhere as well in case it
+# exists. The extension ID got changed with the version bump to 5.1.0.
+ext_path='TorBrowser/Data/Browser/profile.default/extensions'
+directories_to_remove="$ext_path/[email protected] 
$ext_path/[email protected]"
 
 # -----------------------------------------------------------------------------
 
diff --git a/tools/update-packaging/make_incremental_update.sh 
b/tools/update-packaging/make_incremental_update.sh
index 0e1e3f6..c803809 100755
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -64,7 +64,8 @@ check_for_forced_update() {
     fi
 
     # If the file in the skip list ends with /*, do a prefix match.
-    # This allows 
TorBrowser/Data/Browser/profile.default/extensions/[email protected]/* 
to be used to force all HTTPS Everywhere files to be updated.
+    # This allows 
TorBrowser/Data/Browser/profile.default/extensions/[email protected]/*
+    # to be used to force all HTTPS Everywhere files to be updated.
     f_suffix=${f##*/}
     if [[ $f_suffix = "*" ]]; then
       f_prefix="${f%\/\*}";
@@ -122,7 +123,7 @@ archivefiles="updatev2.manifest updatev3.manifest"
 # If the NoScript or HTTPS Everywhere extensions have changed between
 # releases, add them to the "force updates" list.
 ext_path='TorBrowser/Data/Browser/profile.default/extensions'
-https_everywhere='[email protected]'
+https_everywhere='[email protected]'
 noscript='{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi'
 
 # NoScript is a packed extension, so we simply compare the old and the new
@@ -144,12 +145,14 @@ 
https_everywhere_install_rdf="$ext_path/$https_everywhere/install.rdf"
 diff "$olddir/$https_everywhere_install_rdf"     \
       "$newdir/$https_everywhere_install_rdf" > /dev/null
 rc=$?
-if [ $rc -gt 1 ]; then
+if [ $rc -gt 1 -a -e "$olddir/$https_everywhere_install_rdf" ]; then
   notice "Unexpected exit $rc from $https_everywhere_install_rdf diff command"
   exit 2
-elif [ $rc -eq 1 ]; then
+elif [ $rc -ge 1 ]; then
   requested_forced_updates="$requested_forced_updates 
$ext_path/$https_everywhere/*"
-  directories_to_remove="$directories_to_remove $ext_path/$https_everywhere"
+  # Make sure we delete the pre 5.1.0 HTTPS Everywhere as well in case it
+  # exists. The extension ID got changed with the version bump to 5.1.0.
+  directories_to_remove="$directories_to_remove 
$ext_path/[email protected] $ext_path/$https_everywhere"
 fi
 
 mkdir -p "$workdir"

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to