summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2013-01-14 10:29:08 (GMT)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-01-03 17:19:49 (GMT)
commitced000fabaa3944083749ac1251c1c54e4566669 (patch)
treeaadf029f238b71f0b9de510c392d6ca69c34e216
parent4af40e42e16e0cff092306493227fe48be5874d2 (diff)
downloadopen-build-service-ced000fabaa3944083749ac1251c1c54e4566669.tar.gz
open-build-service-ced000fabaa3944083749ac1251c1c54e4566669.tar.xz
Revert "Add debdiff to diffs of changed .dsc and .deb files"
This reverts commit f53cdaa75d693ae071cf134d7302fa7d9d92141c. Debdiff is too slow, especially on big pacakges, so it does more harm then good..
-rw-r--r--src/backend/BSSrcdiff.pm41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/backend/BSSrcdiff.pm b/src/backend/BSSrcdiff.pm
index 4e19425..0b70092 100644
--- a/src/backend/BSSrcdiff.pm
+++ b/src/backend/BSSrcdiff.pm
@@ -28,9 +28,6 @@ use Fcntl;
use strict;
use BSUtil;
-use Data::Dumper;
-use File::Temp qw/ tempdir /;
-use File::Copy qw/ copy /;
#
@@ -295,28 +292,6 @@ sub adddiffheader {
return $r->{'_content'};
}
-sub debdiff {
- my ($f1, $f2, %opts) = @_;
- my @ret;
- my $linecount = 0;
-
- my $diff = '';
- local *D;
- print "Running debdiff on $f1 and $f2\n";
- my $pid = open(D, "debdiff $f1 $f2 |");
- while(<D>) {
- $linecount += 1;
- $diff .= "$_\n";
- }
- close(D);
-
- my $r = {'lines' => $linecount, 'shown' => $linecount, 'binary' => 0, '_content' => $diff};
-
- push @ret, $r;
-
- return @ret;
-}
-
sub tardiff {
my ($f1, $f2, %opts) = @_;
@@ -712,22 +687,6 @@ sub datadiff {
delete $r->{'old'};
delete $r->{'new'};
}
- } elsif ($opts{'doarchive'} && $f =~ /\.(?:deb|dsc)$/) {
- my $tmpdir = tempdir( CLEANUP => 1 );
- print "Doing debdiff on $of..$f in $tmpdir\n";
- my $filename;
- print Dumper($old);
- foreach $filename (keys %$old) {
- copy("$pold/$old->{$filename}-$filename", "$tmpdir/$filename");
- }
- print Dumper($new);
- foreach $filename (keys %$new) {
- copy("$pnew/$new->{$filename}-$filename", "$tmpdir/$filename");
- }
- my @os = stat("$pnew/$old->{$of}-$of");
- my @s = stat("$pnew/$new->{$f}-$f");
- my @r = debdiff("$tmpdir/$of", "$tmpdir/$f", %opts);
- push @changed, {'state' => 'changed', 'diff' => $r[0], 'old' => {'name' => "debdiff of $of", 'md5' => $old->{$of}, 'size' => $os[7]}, 'new' => {'name' => "debdiff of $f", 'md5' => $new->{$f}, 'size' => $s[7]}};
} else {
my @os = stat("$pnew/$old->{$of}-$of");
my @s = stat("$pnew/$new->{$f}-$f");