diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-03-29 17:29:37 +0100 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-03-29 17:29:37 +0100 |
commit | dac3717f22fb4fdb80b513cf8a37ee6cff092aef (patch) | |
tree | 640fa2e075a1bba4d689d78ee0d6b77c4e66322a | |
parent | 3ac0a7b9a2b31b98700ee3199db6feda7f08454d (diff) | |
download | slackbuilder-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.pm | 5 | ||||
-rw-r--r-- | lib/SlackBuild/Request.pm | 1 | ||||
-rw-r--r-- | lib/SlackBuild/URI.pm | 2 |
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 { my $uri = $self->archive->new_abs($file); my ($dh,$tmp) = File::Temp::tempfile(DIR => $dir, UNLINK => 1); chmod 0644, $dh; - unless ($uri->download($tmp)) { + my $subres = $uri->download($tmp); + unless ($subres) { return $result; } my $destfile = File::Spec->catfile($dst, $file); - if ($result->is_html && $self->_html_list($tmp, $file)) { + if ($subres->is_html && $self->_html_list($tmp, $file)) { ; } else { 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 = ( }, build => { type => 'SCALAR', - default => 1, }, slackbuild_uri => { 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 { my $result = new SlackBuild::Download($self, success => $response->is_success); if ($response->is_success) { - $result->content_type(scalar($response->content_type)); + $result->content_type(($response->content_type)[0]); } else { $self->logger->error("$self: " . $response->status_line); } |