Ralf S. Engelschall %!s(int64=24) %!d(string=hai) anos
pai
achega
bbf0cd51ef
Modificáronse 1 ficheiros con 3 adicións e 11 borrados
  1. 3 11
      openpkg/rpmx.pl

+ 3 - 11
openpkg/rpmx.pl

@@ -227,24 +227,17 @@ sub fetch_url {
     }
 
     #   try to fetch the URL
-    unlink("$dst.err");
     unlink("$dst.hdr");
-    $rc = system($CFG->{PRG}->{"curl"}.
+    $rc = system($CFG->{PRG}->{"curl"} .
                  " --location" .
                  " --max-time 1800" .
                  " --connect-timeout 20" .
                  " --dump-header $dst.hdr" .
-                 " --output '$dst' '$src' 2>&1 | tee $dst.err");
-    #            " --stderr $dst.err" .
+                 " --output '$dst' '$src'");
 
     #   check whether command failed
     if ($rc != 0) {
-        unlink($dst);
-        open(FP, "<$dst.err");
-        my $err = <FP>;
-        close(FP);
-        $err =~ s|\n$||;
-        return $err;
+        return "cURL error";
     }
 
     #   check whether remote sites failed
@@ -262,7 +255,6 @@ sub fetch_url {
     }
      
     #   cleanup
-    unlink("$dst.err");
     unlink("$dst.hdr");
 
     return '';