Bug#757528: devscripts: speed up debdiff for 3.0 (quilt) format
package: devscripts version: 2.14.6 severity: wishlist Hi, I spent some time a while back speeding up debdiff and have been testing it for a few months successfully now. This really decreases diffing time/memory for 3.0 packages that share their orig files. Please see proposed patch and some example performance below. Best wishes, Mike $ time debdiff linux_3.14.13-1.dsc linux_3.14.13-2.dsc linux-old.patch real 2m56.959s user 0m28.076s sys 0m14.452s $ time ./devscripts/scripts/debdiff.pl linux_3.14.13-1.dsc linux_3.14.13-2.dsc linux-new.patch real 0m0.814s user 0m0.632s sys 0m0.244s $ diff linux-old.patch linux-new.patch diff -Nru devscripts-2.14.6/debian/changelog devscripts-2.14.6+nmu1/debian/changelog --- devscripts-2.14.6/debian/changelog 2014-08-05 02:34:56.0 + +++ devscripts-2.14.6+nmu1/debian/changelog 2014-08-08 22:12:48.0 + @@ -1,3 +1,9 @@ +devscripts (2.14.6+nmu1) UNRELEASED; urgency=medium + + * Speed up debdiff for source format 3.0 (quilt) packages. + + -- Michael Gilbert mgilb...@debian.org Fri, 08 Aug 2014 22:12:00 + + devscripts (2.14.6) unstable; urgency=medium [ Benjamin Drung ] diff -Nru devscripts-2.14.6/scripts/debdiff.pl devscripts-2.14.6+nmu1/scripts/debdiff.pl --- devscripts-2.14.6/scripts/debdiff.pl 2014-08-05 02:34:56.0 + +++ devscripts-2.14.6+nmu1/scripts/debdiff.pl 2014-08-08 20:25:33.0 + @@ -503,9 +503,12 @@ if ($file =~ /\.diff\.gz$/) { $diffs[$i] = cwd() . '/' . $file; } - elsif ($file =~ /((?:\.orig)?\.tar\.$compression_re|\.git)$/) { - $origs[$i] = $file; + elsif ($file =~ /\.debian\.tar\.$compression_re_file_ext$/) { + $diffs[$i] = cwd() . '/' . $file; } + elsif ($file =~ /((?:\.orig)?\.tar\.$compression_re_file_ext|\.git)$/) { + $origs[$i] = $file; + } } else { warn Unrecognised file line in .dsc:\n$_\n; } @@ -544,7 +547,8 @@ # particularly if the orig tar ball contains one which is patched in the # diffs if ($origs[1] eq $origs[2] and defined $diffs[1] and defined $diffs[2] - and scalar(@excludes) == 0 and $use_interdiff and !$wdiff_source_control) { + and scalar(@excludes) == 0 and $use_interdiff and !$wdiff_source_control + and $dscformats[1] ne '3.0 (quilt)' and $dscformats[2] ne '3.0 (quilt)') { # same orig tar ball, interdiff exists and not wdiffing my $tmpdir = tempdir(CLEANUP = 1); @@ -588,7 +592,7 @@ warn Warning: You do not seem to have interdiff (in the patchutils package)\ninstalled; this program would use it if it were available.\n; } # possibly different orig tarballs, or no interdiff installed, -# or wdiffing debian/control +# or source format 3.0 (quilt), or wdiffing debian/control our ($sdir1, $sdir2); mktmpdirs(); for my $i (1,2) { @@ -596,12 +600,25 @@ my @opts = ('-x'); push (@opts, '--skip-patches') if $dscformats[$i] eq '3.0 (quilt)'; my $diri = ${dir$i}; - eval { - spawn(exec = ['dpkg-source', @opts, $dscs[$i]], - to_file = '/dev/null', - chdir = $diri, - wait_child = 1); - }; + if ($origs[1] eq $origs[2] and $dscformats[$i] eq '3.0 (quilt)') { + eval { + my $source = $origs[$i]; + $source =~ s/\.orig\.tar\.$compression_re_file_ext//; + $source =~ s/_/-/; + mkdir $diri . '/' . $source; + spawn(exec = ['tar', 'xf', $diffs[$i]], + to_file = '/dev/null', + chdir = $diri . '/' . $source, + wait_child = 1); + }; + } else { + eval { + spawn(exec = ['dpkg-source', @opts, $dscs[$i]], + to_file = '/dev/null', + chdir = $diri, + wait_child = 1); + }; + } if ($@) { my $dir = dirname $dscs[1] if $i == 2; $dir = dirname $dscs[2] if $i == 1; ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Processed: your mail
Processing commands for cont...@bugs.debian.org: tag 757528 patch Bug #757528 [devscripts] devscripts: speed up debdiff for 3.0 (quilt) format Added tag(s) patch. thanks Stopping processing here. Please contact me if you need assistance. -- 757528: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757528 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#757529: devscripts: script for diffing packages on snapshot.debian.org
package: devscripts severity: wishlist version: 2.14.6 tags: patch I find myself often wanting to quickly diff two known package versions (without the hassle of website navigation), so I wrote a script to do it: snapdiff. I think a good home for it would be devscripts. Let me know what you think. Best wishes, Mike snapdiff.sh Description: Bourne shell script ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: mk-build-deps: Pass the filenames to unlink for --remove
This is an automated email from the git hooks/post-receive script. jamessan pushed a commit to branch master in repository devscripts. commit 3beb401d91cc86e85f45f0e41fa99d5e84995a8f Author: James McCoy james...@debian.org Date: Fri Aug 8 20:09:55 2014 -0400 mk-build-deps: Pass the filenames to unlink for --remove Closes: #757481 Signed-off-by: James McCoy james...@debian.org --- debian/changelog | 2 ++ scripts/mk-build-deps.pl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bc6be8f..32e97d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ devscripts (2.14.7) UNRELEASED; urgency=low * debsign/debi/debc: Delay checking for the existence of the --debs-dir/DEBRELEASE_DEBS_DIR directory until we get to code that actually uses said directory. (Closes: #544366) + * mk-build-deps: Pass the file, not package, names to unlink when --remove +is given. (Closes: #757481) -- Cyril Brulebois k...@debian.org Fri, 08 Aug 2014 01:27:12 +0200 diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl index c84dc38..012c814 100755 --- a/scripts/mk-build-deps.pl +++ b/scripts/mk-build-deps.pl @@ -361,7 +361,7 @@ if ($opt_install) { } if ($opt_remove) { - foreach my $file (map { $_-{package} } @packages) { + foreach my $file (@deb_files) { unlink $file; } } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch master updated (bf5b903 - 3beb401)
This is an automated email from the git hooks/post-receive script. jamessan pushed a change to branch master in repository devscripts. from bf5b903 Add Closes for #757425 new 3beb401 mk-build-deps: Pass the filenames to unlink for --remove The 1 revisions listed above as new are entirely new to this repository and will be described in separate emails. The revisions listed as adds were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 2 ++ scripts/mk-build-deps.pl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Processed: Bug#757481 marked as pending
Processing commands for cont...@bugs.debian.org: tag 757481 pending Bug #757481 [devscripts] devscripts: [mk-build-deps] broken --remove option Added tag(s) pending. thanks Stopping processing here. Please contact me if you need assistance. -- 757481: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757481 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel