]> git.donarmstrong.com Git - wannabuild.git/commitdiff
strip newlines on multiline fields in export output correctly
authorJoachim Breitner <nomeata@debian.org>
Sat, 25 Jul 2009 01:27:56 +0000 (01:27 +0000)
committerPhilipp Kern <pkern@debian.org>
Sat, 25 Jul 2009 01:27:56 +0000 (01:27 +0000)
Signed-off-by: Philipp Kern <pkern@debian.org>
bin/wanna-build

index 8a9352f4b052ac690b12987f41618ab5150df243..0dcd3764a7388f4efd7850ebf08bc555187ba885 100755 (executable)
@@ -2186,6 +2186,7 @@ sub write_db {
                                if (!defined($ui->{'User'}));
                            foreach $key (keys %{$ui}) {
                                my $val = $ui->{$key};
+                                $val =~ s/\n*$//;
                                $val =~ s/^/ /mg;
                                $val =~ s/^ $/ ./mg;
                                print F "$key: $val\n";
@@ -2196,7 +2197,7 @@ sub write_db {
                else {
                        foreach $key (keys %{$pkg}) {
                                my $val = $pkg->{$key};
-                               chomp( $val );
+                                $val =~ s/\n*$//;
                                $val =~ s/^/ /mg;
                                $val =~ s/^ $/ ./mg;
                                print F "$key: $val\n";