summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-03-29 17:29:37 +0100
committerSergey Poznyakoff <gray@gnu.org.ua>2019-03-29 17:29:37 +0100
commitdac3717f22fb4fdb80b513cf8a37ee6cff092aef (patch)
tree640fa2e075a1bba4d689d78ee0d6b77c4e66322a
parent3ac0a7b9a2b31b98700ee3199db6feda7f08454d (diff)
downloadslackbuilder-dac3717f22fb4fdb80b513cf8a37ee6cff092aef.tar.gz
slackbuilder-dac3717f22fb4fdb80b513cf8a37ee6cff092aef.tar.bz2
Bugfixes
* lib/SlackBuild/Archive/Extractor/HTTP.pm (extract): Use the proper download object. Fixes a6c49ece. * lib/SlackBuild/Request.pm:" Remove default for build. It cannot be used because it doesn't let prog.SlackBuild define its value. * lib/SlackBuild/URI.pm: Minor change (for readability).
-rw-r--r--lib/SlackBuild/Archive/Extractor/HTTP.pm5
-rw-r--r--lib/SlackBuild/Request.pm1
-rw-r--r--lib/SlackBuild/URI.pm2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/SlackBuild/Archive/Extractor/HTTP.pm b/lib/SlackBuild/Archive/Extractor/HTTP.pm
index 4676d95..ad6e1d2 100644
--- a/lib/SlackBuild/Archive/Extractor/HTTP.pm
+++ b/lib/SlackBuild/Archive/Extractor/HTTP.pm
@@ -42,11 +42,12 @@ sub extract {
42 my $uri = $self->archive->new_abs($file); 42 my $uri = $self->archive->new_abs($file);
43 my ($dh,$tmp) = File::Temp::tempfile(DIR => $dir, UNLINK => 1); 43 my ($dh,$tmp) = File::Temp::tempfile(DIR => $dir, UNLINK => 1);
44 chmod 0644, $dh; 44 chmod 0644, $dh;
45 unless ($uri->download($tmp)) { 45 my $subres = $uri->download($tmp);
46 unless ($subres) {
46 return $result; 47 return $result;
47 } 48 }
48 my $destfile = File::Spec->catfile($dst, $file); 49 my $destfile = File::Spec->catfile($dst, $file);
49 if ($result->is_html && $self->_html_list($tmp, $file)) { 50 if ($subres->is_html && $self->_html_list($tmp, $file)) {
50 ; 51 ;
51 } else { 52 } else {
52 rename $tmp, $destfile 53 rename $tmp, $destfile
diff --git a/lib/SlackBuild/Request.pm b/lib/SlackBuild/Request.pm
index 3876b56..c45f834 100644
--- a/lib/SlackBuild/Request.pm
+++ b/lib/SlackBuild/Request.pm
@@ -107,7 +107,6 @@ my %attributes = (
107 }, 107 },
108 build => { 108 build => {
109 type => 'SCALAR', 109 type => 'SCALAR',
110 default => 1,
111 }, 110 },
112 slackbuild_uri => { 111 slackbuild_uri => {
113 type => 'SCALAR', 112 type => 'SCALAR',
diff --git a/lib/SlackBuild/URI.pm b/lib/SlackBuild/URI.pm
index b0d6724..93fa9ef 100644
--- a/lib/SlackBuild/URI.pm
+++ b/lib/SlackBuild/URI.pm
@@ -77,7 +77,7 @@ sub download {
77 my $result = new SlackBuild::Download($self, 77 my $result = new SlackBuild::Download($self,
78 success => $response->is_success); 78 success => $response->is_success);
79 if ($response->is_success) { 79 if ($response->is_success) {
80 $result->content_type(scalar($response->content_type)); 80 $result->content_type(($response->content_type)[0]);
81 } else { 81 } else {
82 $self->logger->error("$self: " . $response->status_line); 82 $self->logger->error("$self: " . $response->status_line);
83 } 83 }

Return to:

Send suggestions and report system problems to the System administrator.