Don't use Cwd::abs_path which is broken on old perls. a=jorgk DONTBUILD THUNDERBIRD560b4_2017092101_RELBRANCH
authorTom Prince <mozilla@hocat.ca>
Fri, 22 Sep 2017 16:51:31 -0600
branchTHUNDERBIRD560b4_2017092101_RELBRANCH
changeset 431766 34e421e834210f92aaf25ea26c6ccfcfeb47a08d
parent 431736 8cd303b7f40f5997a647f2b0ed08e4993551f52a
child 431777 d4224244e154fcebaee2fc69657242a0aa334b82
child 431868 92b89b2eec556489b6cc5e7b267c1e451d52c220
push id7803
push usermozilla@jorgk.com
push dateSat, 23 Sep 2017 02:56:53 +0000
treeherdermozilla-beta@34e421e83421 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
milestone56.0
Don't use Cwd::abs_path which is broken on old perls. a=jorgk DONTBUILD MozReview-Commit-ID: HRnmz9DhRcv
tools/update-packaging/unwrap_full_update.pl
--- a/tools/update-packaging/unwrap_full_update.pl
+++ b/tools/update-packaging/unwrap_full_update.pl
@@ -7,17 +7,17 @@
 # This tool unpacks a full update package generated by make_full_update.sh
 # Author: Benjamin Smedberg
 #
 
 # -----------------------------------------------------------------------------
 # By default just assume that these tools exist on our path
 
 use Getopt::Std;
-use Cwd 'abs_path';
+use File::Spec;
 
 my ($MAR, $XZ, $BZIP2, $MAR_OLD_FORMAT, $archive, @marentries, @marfiles);
 
 if (defined($ENV{"MAR"})) {
     $MAR = $ENV{"MAR"};
 }
 else {
     $MAR = "mar";
@@ -31,28 +31,35 @@ else {
 }
 
 if (defined($ENV{"XZ"})) {
     $XZ = $ENV{"XZ"};
 }
 else {
     if (system("xz --version > /dev/null 2>&1") != 0) {
         # Some of the Windows build systems have xz.exe in topsrcdir/xz/.
-        my $xzwinpath = abs_path(__FILE__);
+        my $xzwinpath = File::Spec->rel2abs(__FILE__);
         $xzwinpath = substr($xzwinpath, 0, rindex($xzwinpath, '/'));
         $xzwinpath = substr($xzwinpath, 0, rindex($xzwinpath, '/'));
         $xzwinpath = substr($xzwinpath, 0, rindex($xzwinpath, '/'));
-        $xzwinpath = $xzwinpath . "/xz/xz.exe";
-        if (-e $xzwinpath) {
-            $XZ = $xzwinpath;
+        my $xzwin = $xzwinpath . "/xz/xz.exe";
+        if (-e $xzwin) {
+            $XZ = $xzwin;
         }
         else {
-            # If the xz executable was not found fallback to trying to execute
-            # xz and follow the normal failure path if it isn't found.
-            $XZ = "xz";
+            $xzwinpath = substr($xzwinpath, 0, rindex($xzwinpath, '/'));
+            $xzwin = $xzwinpath . "/xz/xz.exe";
+            if (-e $xzwin) {
+                $XZ = $xzwin;
+            }
+            else {
+                # If the xz executable was not found fallback to trying to execute
+                # xz and follow the normal failure path if it isn't found.
+                $XZ = "xz";
+            }
         }
     }
     else {
         $XZ = "xz";
     }
 }
 
 sub print_usage