chiark / gitweb /
WIP commod-update-receiver testing - seems to work
[ypp-sc-tools.web-live.git] / pctb / Commods.pm
index 073906ff9da07defd3a8aa3380115ffc6c3cbcd9..5eb9c7bba749cb1a09888c0b32c9bd9608cae499 100644 (file)
@@ -117,7 +117,10 @@ sub get_our_version ($$) {
     my ($aref,$prefix) = @_;
     $aref->{"${prefix}name"}= 'ypp-sc-tools yarrg';
     $aref->{"${prefix}fixes"}= 'lastpage';
-    $aref->{"${prefix}version"}= `git-describe --tags HEAD`; $? and die $?;
+
+    my $version= `git-describe --tags HEAD`; $? and die $?;
+    chomp($version);
+    $aref->{"${prefix}version"}= $version;
     return $aref;
 }
 
@@ -148,7 +151,7 @@ sub pipethrough_run_gzip ($) {
 
 sub cgipostform ($$$) {
     my ($ua, $url, $form) = @_;
-    my $req= HTTP::Request::Common::POST($url, 
+    my $req= HTTP::Request::Common::POST($url,
                                         Content => $form,
                                         Content_Type => 'form-data');
     if ($url =~ m,^\.?/,) {
@@ -173,6 +176,7 @@ sub cgipostform ($$$) {
            }
 #system 'printenv >&2';
        }, "$url", "$url");
+       $out =~ s/\r\n/\n/g;
        $out =~ m,^Content-Type: text/plain.*\n\n, or die "$out ?";
        return $';
     } else {