Bug 1405068: Don't use Cwd::abs_path in unwrap_full_update.pl.
It is broken on the version of perl on the legacy buildbots, which is the only
place that this branch of the code runs.
MozReview-Commit-ID: 1Urw6mNOEHf
--- a/tools/update-packaging/unwrap_full_update.pl
+++ b/tools/update-packaging/unwrap_full_update.pl
@@ -7,17 +7,16 @@
# 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';
my ($MAR, $XZ, $BZIP2, $MAR_OLD_FORMAT, $archive, @marentries, @marfiles);
if (defined($ENV{"MAR"})) {
$MAR = $ENV{"MAR"};
}
else {
$MAR = "mar";
@@ -31,28 +30,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__;
$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