Bug 1405068: Don't use Cwd::abs_path in unwrap_full_update.pl. r=bhearsum

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

--HG--
extra : rebase_source : d599484b0f2062b7e3178e761c80b620624852a3
This commit is contained in:
Tom Prince 2017-10-02 12:25:05 -06:00
Родитель 031841670d
Коммит 106f7e2a00
1 изменённых файлов: 14 добавлений и 8 удалений

Просмотреть файл

@ -12,7 +12,6 @@
# 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);
@ -36,18 +35,25 @@ if (defined($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 {