Bug#616066: Fix for bug 616066

2011-08-27 Thread Ryan Niebur
Hi, On Tue, Aug 23, 2011 at 03:35:55PM -0400, Anders Kaseorg wrote: > On 08/23/2011 03:19 PM, Raphael Hertzog wrote: > >So it looks ok for me. > > Great. Thanks for taking the time to review this. Here's the final > debdiff (equivalent to patch 1 from message #132 plus patches 2-6 > from messag

Bug#616066: Fix for bug 616066

2011-08-23 Thread Anders Kaseorg
On 08/23/2011 03:59 PM, Raphael Hertzog wrote: If I don't get any answer, are you interested to take over the maintenance of debsums? Sure, I can do that. Do you have an alioth account Yes, andersk-guest. and do you have access to the collab-maint project? No. Anders -- To UNSUBSCRI

Bug#616066: Fix for bug 616066

2011-08-23 Thread Raphael Hertzog
Hi, On Tue, 23 Aug 2011, Anders Kaseorg wrote: > On 08/23/2011 03:19 PM, Raphael Hertzog wrote: > >So it looks ok for me. > > Great. Thanks for taking the time to review this. Here's the final > debdiff (equivalent to patch 1 from message #132 plus patches 2-6 > from message #112). > > Are you

Bug#616066: Fix for bug 616066

2011-08-23 Thread Anders Kaseorg
On 08/23/2011 03:19 PM, Raphael Hertzog wrote: So it looks ok for me. Great. Thanks for taking the time to review this. Here's the final debdiff (equivalent to patch 1 from message #132 plus patches 2-6 from message #112). Are you willing to get it uploaded? Anders diff -Nru debsums-2.0.

Bug#616066: Fix for bug 616066

2011-08-23 Thread Raphael Hertzog
On Tue, 23 Aug 2011, Anders Kaseorg wrote: > On 08/23/2011 09:14 AM, Raphael Hertzog wrote: > >On Sun, 21 Aug 2011, Anders Kaseorg wrote: > >>+} elsif ($path !~ /:/ and -e "$DPKG/info/$path:$arch.list") { > >>+ return "$DPKG/info/$path:$arch.md5sums"; > > > >This elsif is probably useless, if

Bug#616066: Fix for bug 616066

2011-08-23 Thread Anders Kaseorg
On 08/23/2011 09:14 AM, Raphael Hertzog wrote: On Sun, 21 Aug 2011, Anders Kaseorg wrote: +} elsif ($path !~ /:/ and -e "$DPKG/info/$path:$arch.list") { + return "$DPKG/info/$path:$arch.md5sums"; This elsif is probably useless, if we have a pkg:arch.list file it means we have a multi

Bug#616066: Fix for bug 616066

2011-08-23 Thread Raphael Hertzog
On Sun, 21 Aug 2011, Anders Kaseorg wrote: > I return the path of an .md5sums file if the corresponding .list file > exists. That should be fine for installed packages even if they have no > .md5sums file, and debsums only works on installed packages. Oh, right, I misread. Should be good then. >

Bug#616066: Fix for bug 616066

2011-08-21 Thread Anders Kaseorg
On 08/17/2011 04:35 AM, Raphael Hertzog wrote: On Tue, 16 Aug 2011, Anders Kaseorg wrote: +sub md5sums_path +{ +# Calling dpkg-query --control-path for every package is too slow, +# so we cheat a little bit. + +my ($path) = @_; +return "$DPKG/info/$path.md5sums" if -e "$DPKG/info

Bug#616066: Fix for bug 616066

2011-08-17 Thread Raphael Hertzog
Hi, On Tue, 16 Aug 2011, Anders Kaseorg wrote: > +sub md5sums_path > +{ > +# Calling dpkg-query --control-path for every package is too slow, > +# so we cheat a little bit. > + > +my ($path) = @_; > +return "$DPKG/info/$path.md5sums" if -e "$DPKG/info/$path.list"; > +return "$D

Bug#616066: Fix for bug 616066

2011-08-16 Thread Anders Kaseorg
This should address your comments so far. A new patch series is attached (and also available in the same Git repository). On 07/29/2011 06:01 AM, Raphael Hertzog wrote: PackageSpec is not supported in the current dpkg version so you can't really use it until my branch gets merged and a new dpkg

Bug#616066: Fix for bug 616066

2011-07-29 Thread Raphael Hertzog
Hi, On Fri, 29 Jul 2011, Anders Kaseorg wrote: > Sure, well, I kind of assumed that the debsums maintainer isn’t really > paying attention, what with three NMUs on top of the last maintainer > upload 19 months ago, and you maybe have some interest in getting this fix > NMUed. Maybe you should

Bug#616066: Fix for bug 616066

2011-07-29 Thread Raphael Hertzog
On Fri, 08 Jul 2011, Anders Kaseorg wrote: > +my @field_names = qw(PackageSpec Version Status Conffiles Replaces); > +local $/ = "\n\n"; > +open DPKG, '-|', 'dpkg-query', "--admindir=$DPKG", > + '--showformat=' . (join '', map {"\${$_}$/"} @field_names), > + '--show' > + o

Bug#616066: Fix for bug 616066

2011-07-29 Thread Anders Kaseorg
On Fri, 29 Jul 2011, Raphael Hertzog wrote: > I'm not the debsums maintainer :) Sure, well, I kind of assumed that the debsums maintainer isn’t really paying attention, what with three NMUs on top of the last maintainer upload 19 months ago, and you maybe have some interest in getting this fix

Bug#616066: Fix for bug 616066

2011-07-29 Thread Raphael Hertzog
Hi, On Fri, 29 Jul 2011, Anders Kaseorg wrote: > Apparently multiarch is a release goal now. Raphaël, have you gotten a > chance to look at my entire branch (or my debdiff, which is made from the > entire branch)? It should already satisfy the issue you brought up. I'm not the debsums maintai

Bug#616066: Fix for bug 616066

2011-07-29 Thread Anders Kaseorg
Apparently multiarch is a release goal now. Raphaël, have you gotten a chance to look at my entire branch (or my debdiff, which is made from the entire branch)? It should already satisfy the issue you brought up. Anders -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org w

Bug#616066: Fix for bug 616066

2011-07-08 Thread Anders Kaseorg
On Fri, 8 Jul 2011, Raphael Hertzog wrote: > That's wrong. $arch might be different from dpkg --print-architecture, the > precise point of multiarch is to be able to install package of other > architectures... That gets fixed by the rest of my branch. For packages of other architectures, the arc

Bug#616066: Fix for bug 616066

2011-07-08 Thread Raphael Hertzog
On Fri, 08 Jul 2011, Anders Kaseorg wrote: > +chomp ($arch = `/usr/bin/dpkg --print-architecture`); > + [...] > +sub md5sums_path > +{ > +# Calling dpkg-query --control-path for every package is too slow, > +# so we cheat a little bit. > + > +my ($path) = @_; > +return "$DPKG/info/$

Bug#616066: Fix for bug 616066

2011-07-08 Thread Anders Kaseorg
tags 616066 patch thanks How about just using $pack.md5sums if $pack.list exists, or $pack:$arch.md5sums if $pack:$arch.list? http://andersk.mit.edu/gitweb/debsums.git/commitdiff/efa322f I have a branch on top of that to stop reading /var/lib/dpkg/status directly, and add multiarch support:

Bug#616066: Fix for bug 616066

2011-07-05 Thread Anders Kaseorg
On Thu, 30 Jun 2011, Stéphane Graber wrote: > Attached is yet another patch that this time tries to bypass the md5sums > generation if an arch-specific md5sums file already exists. That patch doesn’t work. By wrapping a foreach loop around the ‘next;’ statements, you have changed their meaning.

Bug#616066: Fix for bug 616066

2011-06-30 Thread Stéphane Graber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 06/30/2011 11:17 AM, Raphael Hertzog wrote: > On Thu, 30 Jun 2011, Stéphane Graber wrote: >> if ($generate{keep}) { - my $target = >> "$DPKG/info/$pack.md5sums"; -copy $sums, $target - >> or die >> "$self: can't

Bug#616066: Fix for bug 616066

2011-06-30 Thread Stéphane Graber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 06/30/2011 11:17 AM, Raphael Hertzog wrote: > On Thu, 30 Jun 2011, Stéphane Graber wrote: >> if ($generate{keep}) { - my $target = >> "$DPKG/info/$pack.md5sums"; -copy $sums, $target - >> or die >> "$self: can't

Bug#616066: Fix for bug 616066

2011-06-30 Thread Raphael Hertzog
On Thu, 30 Jun 2011, Stéphane Graber wrote: > if ($generate{keep}) > { > - my $target = "$DPKG/info/$pack.md5sums"; > - copy $sums, $target > - or die "$self: can't copy sums to $target ($!)\n"; > + @sumfiles = glob("$DPKG/info/$pack.md5sums > $DPKG/

Bug#616066: Fix for bug 616066

2011-06-30 Thread Stéphane Graber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 06/30/2011 08:02 AM, Raphael Hertzog wrote: > On Thu, 30 Jun 2011, Anders Kaseorg wrote: >> $ time for p in $(dpkg-query -W -f='${PackageSpec} '); do \ >> dpkg-query --control-path "$p" md5sums; done >/dev/null >> >> real 2m34.050s user 2m8.480

Bug#616066: Fix for bug 616066

2011-06-30 Thread Raphael Hertzog
On Thu, 30 Jun 2011, Anders Kaseorg wrote: > $ time for p in $(dpkg-query -W -f='${PackageSpec} '); do \ > dpkg-query --control-path "$p" md5sums; done >/dev/null > > real 2m34.050s > user 2m8.480s > sys 0m19.140s Hum, ok. > That accounts for basically all of the time the debsums hook is n

Bug#616066: Fix for bug 616066

2011-06-29 Thread Anders Kaseorg
On Thu, 30 Jun 2011, Raphaël Hertzog wrote: > It's not dpkg-query --control-path that is slow. No, it actually is quite slow, when you have to do it separately for every installed package: $ time for p in $(dpkg-query -W -f='${PackageSpec} '); do \ dpkg-query --control-path "$p" md5sums; done

Bug#616066: Fix for bug 616066

2011-06-29 Thread Raphael Hertzog
On Thu, 30 Jun 2011, Anders Kaseorg wrote: > On Thu, 30 Jun 2011, Raphaël Hertzog wrote: > > One can run dpkg-query with multiple arguments to avoid the overhead. > > But it requires some refactoring of the code I guess. I.e. find out the > > list of package first, then run dpkg-query on all the

Bug#616066: Fix for bug 616066

2011-06-29 Thread Anders Kaseorg
On Thu, 30 Jun 2011, Raphaël Hertzog wrote: > One can run dpkg-query with multiple arguments to avoid the overhead. > But it requires some refactoring of the code I guess. I.e. find out the > list of package first, then run dpkg-query on all the packages at the > same time. Like this? It doesn

Bug#616066: Fix for bug 616066

2011-06-29 Thread Raphael Hertzog
On Wed, 29 Jun 2011, Anders Kaseorg wrote: > That patch caused an outrageous 4% performance regression in the > debsums apt hook (/etc/apt/apt.conf.d/90debsums), such that now it takes > several minutes to install anything with apt. > > Before: > $ sudo time /usr/bin/debsums --generate=noche

Bug#616066: Fix for bug 616066

2011-06-29 Thread Anders Kaseorg
That patch caused an outrageous 4% performance regression in the debsums apt hook (/etc/apt/apt.conf.d/90debsums), such that now it takes several minutes to install anything with apt. Before: $ sudo time /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives 0.35user 0.02system 0:00

Bug#616066: Fix for bug 616066

2011-06-27 Thread Stéphane Graber
Attached is a quick fix for this bug, using dpkg-query to get the path to md5sums. I did this to fix Launchpad bug 776030 (https://bugs.launchpad.net/debian/+source/debsums/+bug/776030) where debsums would fail to find the md5sums on any multiarch package. My perl is a bit rusty but it "works for