]> git.donarmstrong.com Git - wannabuild.git/commitdiff
fix binNMU detection of installed packages, and fix testsuite and logging
authorAndreas Barth <aba@not.so.argh.org>
Fri, 11 Jun 2010 15:15:07 +0000 (15:15 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Fri, 11 Jun 2010 15:15:07 +0000 (15:15 +0000)
bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index 1b75e7615491c3ea6f9c3f885d70fe689cb7a0c2..6124fb3914b53b0972ca9fa7d3eae86dadc64d89 100755 (executable)
@@ -42,6 +42,7 @@ use File::Copy;
 use DBI;
 use lib '/org/wanna-build/bin';
 use lib '/org/wanna-build/lib';
+#use lib 'lib';
 use WannaBuild;
 use YAML::Tiny;
 use Data::Dumper;
@@ -2947,7 +2948,11 @@ sub parse_all_v3() {
             }
             $pkg->{'package'}  = $name;
         }
-        my $logstr = "merge-v3 $vars->{'time'} ".$name."_$pkgs->{'version'} ($vars->{'arch'}, $vars->{'suite'}, previous: $pkg->{'version'}, $pkg->{'state'}):";
+        my $logstr = "merge-v3 $vars->{'time'} ".$name."_$pkgs->{'version'}".
+            ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
+            "($vars->{'arch'}, $vars->{'suite'}, previous: $pkg->{'version'}".
+            ($pkg->{'binary_nmu_version'} ? ";b".$pkg->{'binary_nmu_version'} : "").
+            ", $pkg->{'state'}):";
 
         if (isin($pkgs->{'status'}, qw (installed related)) && $pkg->{'binary_nmu_version'} && $pkgs->{'binnmu'} < $pkg->{'binary_nmu_version'}) {
                 $pkgs->{'status'} = 'out-of-date';
index f4b1f5fbd88a40eca2f3ebe8a5f8a8e218f2778d..d5cefb328ea9388ec4c774ac0249a67e5c8e36e7 100644 (file)
@@ -3,6 +3,7 @@ package WB::QD;
 use strict;
 use IO::Uncompress::AnyInflate qw(anyinflate);
 use Dpkg::Version qw(vercmp);
+use Data::Dumper;
 
 sub readsourcebins {
     my $arch = shift;
@@ -60,12 +61,12 @@ sub readsourcebins {
         while(<$P>) {
             my $p;
             /^Version:\s*(\S+)$/mi and $p->{'version'} = $1;
+            /^Version:\s*(\S+)\+b([0-9]+)$/mi and $p->{'version'} = $1 and $p->{'binnmu'} = $2;
             /^Architecture:\s*(\S+)$/mi and $p->{'arch'} = $1;
             /^Package:\s*(\S+)$/mi and $p->{'binary'} = $1;
             /^Package:\s*(\S+)$/mi and $p->{'source'} = $1;
             /^Source:\s*(\S+)$/mi and $p->{'source'} = $1;
             /^Source:\s*(\S+)\s+\((\S+)\)$/mi and $p->{'source'} = $1 and $p->{'version'} = $2;
-            $p->{'version'} =~ /(\S+)\+b([0-9]+)/ and $p->{'version'} = $1 and $p->{'binnmu'} = $2;
 
             next unless $p->{'arch'} eq 'all' || $p->{'arch'} eq ${arch};
             $binary->{$p->{'binary'}} = { 'version' => $p->{'version'}, 'arch' => $p->{'arch'}} unless $binary->{$p->{'binary'}} and vercmp($binary->{$p->{'binary'}}->{'version'}, $p->{'version'}) < 0;
index 899eb102e43785d9dfc5a21e96634622e9003d22..9a4ceabc5fb26ecc9102260afa0daf50f3bb2b6e 100755 (executable)
@@ -80,6 +80,7 @@ Architecture: i386
 Version: 5.6
 
 Package: bash
+Source: bash (4.1-3)
 Priority: required
 Section: shells
 Architecture: i386