summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2019-03-29 16:29:37 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2019-03-29 16:29:37 (GMT)
commitdac3717f22fb4fdb80b513cf8a37ee6cff092aef (patch) (side-by-side diff)
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).
Diffstat (more/less context) (ignore whitespace changes)
-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 {
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);
}

Return to:

Send suggestions and report system problems to the System administrator.