Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1f39c0bd
Kaydet (Commit)
1f39c0bd
authored
Ock 09, 2016
tarafından
Andrea Pescetti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i126469# Fix failing checksums at first download attempt in ./bootstrap
Patch By: j.nitschke <j.nitschke@ok.de>
üst
fe1b988b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
46 deletions
+9
-46
download_external_dependencies.pl
solenv/bin/download_external_dependencies.pl
+9
-46
No files found.
solenv/bin/download_external_dependencies.pl
Dosyayı görüntüle @
1f39c0bd
...
...
@@ -85,15 +85,7 @@ use File::Basename;
use
Digest::
MD5
;
use
Digest::
SHA
;
use
URI
;
my
$simple
=
1
;
if
(
$simple
)
{
use
LWP::
Simple
;
}
else
{
use
LWP::
UserAgent
;
}
use
LWP::
UserAgent
;
my
$Debug
=
1
;
...
...
@@ -538,54 +530,25 @@ sub DownloadFile ($$$)
# Download the extension.
my
$success
=
0
;
if
(
$simple
)
{
my
$content
=
LWP::Simple::
get
(
$URL
);
$success
=
defined
$content
;
my
$agent
=
LWP::
UserAgent
->
new
();
$agent
->
env_proxy
;
my
$response
=
$agent
->
get
(
$URL
);
$success
=
$response
->
is_success
;
if
(
$success
)
{
my
$content
=
$response
->
content
;
open
$out
,
">$temporary_filename"
;
binmode
(
$out
);
print
$out
$content
;
close
(
$out
);
$digest
->
add
(
$content
);
}
else
{
print
"download from $URL failed\n"
;
}
}
else
{
my
$agent
=
LWP::
UserAgent
->
new
();
$agent
->
timeout
(
120
);
$agent
->
env_proxy
;
$agent
->
show_progress
(
1
);
my
$last_was_redirect
=
0
;
$agent
->
add_handler
(
'response_redirect'
=>
sub
{
$last_was_redirect
=
1
;
return
;
});
$agent
->
add_handler
(
'response_data'
=>
sub
{
if
(
$last_was_redirect
)
{
$last_was_redirect
=
0
;
# Throw away the data we got so far.
$digest
->
reset
();
close
$out
;
open
$out
,
">$temporary_filename"
;
binmode
(
$out
);
}
my
(
$response
,
$agent
,
$h
,
$data
)
=
@_
;
print
$out
$data
;
$digest
->
add
(
$data
);
});
$success
=
$agent
->
get
(
$URL
)
->
is_success
();
close
$out
;
}
close
(
$out
);
# When download was successful then check the checksum and rename the .part file
# into the actual extension name.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment