]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wanna-build
strip newlines on multiline fields in export output correctly
[wannabuild.git] / bin / wanna-build
index 4f3690cdd1977990ea15a127e4eba260c20a9add..0dcd3764a7388f4efd7850ebf08bc555187ba885 100755 (executable)
@@ -274,7 +274,6 @@ if (!$fail_reason) {
                while(!eof(STDIN)) {
                        $line = <STDIN>;
                        last if $line eq ".\n";
-                       $line = ".\n" if $line eq "\n";
                        $fail_reason .= $line;
                }
                chomp( $fail_reason );
@@ -1901,7 +1900,7 @@ sub info_packages {
                                my $val = $pkg->{$key};
                                chomp( $val );
                                $val = "\n$val" if isin( $key, qw(Failed Old-Failed));
-                               $val =~ s/\n/\n /g;
+                               $val =~ s/\n/\n    /g;
                                printf "  %-20s: %s\n", $key, $val;
                        }
                        foreach $key (sort keys %$pkg) {
@@ -1909,7 +1908,7 @@ sub info_packages {
                                my $val = $pkg->{$key};
                                chomp( $val );
                                $val = "\n$val" if isin( $key, qw(Failed Old-Failed));
-                               $val =~ s/\n/\n /g;
+                               $val =~ s/\n/\n    /g;
                                printf "  %-20s: %s\n", $key, $val;
                        }
                }
@@ -2187,8 +2186,9 @@ sub write_db {
                                if (!defined($ui->{'User'}));
                            foreach $key (keys %{$ui}) {
                                my $val = $ui->{$key};
-                               chomp($val);
-                               $val =~ s/\n/\n /g;
+                                $val =~ s/\n*$//;
+                               $val =~ s/^/ /mg;
+                               $val =~ s/^ $/ ./mg;
                                print F "$key: $val\n";
                            }
                            print F "\n";
@@ -2197,8 +2197,9 @@ sub write_db {
                else {
                        foreach $key (keys %{$pkg}) {
                                my $val = $pkg->{$key};
-                               chomp( $val );
-                               $val =~ s/\n/\n /g;
+                                $val =~ s/\n*$//;
+                               $val =~ s/^/ /mg;
+                               $val =~ s/^ $/ ./mg;
                                print F "$key: $val\n";
                        }
                        print F "\n";
@@ -2592,6 +2593,9 @@ Options:
         for some source dependencies to become available
     --binNMU num: Schedule a re-build of the package with unchanged source, but
          a new version number (source-version + "+b<num>")
+    --give-back: Mark a package as ready to build that is in state Building,
+        Built or Build-Attempted. To give back a package in state Failed, use
+        --override
     --merge-quinn: Merge quinn-diff output into database.
     --merge-packages: Merge Packages files into database.
     --pretend-avail: Pretend that given packages are available now and give