]> git.donarmstrong.com Git - wannabuild.git/commitdiff
WB::QD: handle case when arch=all-packages becomes arch=any (plus testcase)
authorAndreas Barth <aba@not.so.argh.org>
Sat, 2 Apr 2011 12:59:46 +0000 (12:59 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sat, 2 Apr 2011 12:59:46 +0000 (12:59 +0000)
bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index 7d3678ac4663abf5f2c601ab9b722473ff3c34fd..d3faced3acc6a955e3c297c9205ae88d6d87a547 100755 (executable)
@@ -2377,6 +2377,8 @@ sub parse_all_v3 {
             }
             $pkg->{'package'}  = $name;
         }
+        $pkg->{'version'} ||= "";
+        $pkg->{'state'} ||= "";
         my $logstr = sprintf("merge-v3 %s %s_%s", $vars->{'time'}, $name, $pkgs->{'version'}).
             ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
             sprintf(" (%s, %s, previous: %s", $vars->{'arch'}, $vars->{'suite'}, $pkg->{'version'}//"").
index 48ae97902b84e661ff9631f39b171e83af94afbd..5f84d5ebe065b12a7b6cb6ac65e2afa82b16d6b1 100644 (file)
@@ -77,6 +77,8 @@ sub readsourcebins {
             /^Source:\s*(\S+)$/mi and $p->{'source'} = $1;
             /^Source:\s*(\S+)\s+\((\S+)\)$/mi and $p->{'source'} = $1 and $p->{'version'} = $2;
 
+            # consider packages as non-existant if it's all but outdated
+            next if $p->{'arch'} eq 'all' && $srcs->{$p->{'source'}} && $srcs->{$p->{'source'}}->{'version'} && vercmp($srcs->{$p->{'source'}}->{'version'}, $p->{'version'}) > 0;
             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 6ae5100014a258cf6db0df07c9ce29f193c0ea9f..a0fc99c62b14526eb0666357701ce69ee7498705 100755 (executable)
@@ -83,6 +83,13 @@ Priority: required
 Section: admin
 Architecture: linux-any
 
+Package: lv2core
+Binary: lv2core
+Version: 4.0-5
+Priority: optional
+Section: sound
+Architecture: any
+
 EOF
 ;
 
@@ -124,6 +131,13 @@ Section: devel
 Architecture: all
 Version: 0.196
 
+Package: lv2core
+Priority: optional
+Section: sound
+Installed-Size: 112
+Architecture: all
+Version: 3.0-3
+
 EOF
 ;
 
@@ -211,6 +225,16 @@ is_deeply ($$srcs, {
                             'depends' => 'debhelper (>= 7), docbook-xsl, ldp-docbook-xsl (>= 0.0.20040321-0.1), xsltproc, dpkg-dev (>= 1.13.19), dblatex, debconf | debconf-2.0, po-debconf, po4a',
                             'conflicts' => 'dash'
                           },
+            'lv2core' => {
+                'priority' => 'optional',
+                'status' => 'uncompiled',
+                'version' => '4.0-5',
+                'binary' => [
+                        'lv2core'
+                      ],
+                'name' => 'lv2core',
+                'section' => 'sound'
+            },
             '_binary' => {
                 'e2fsprogs' => {'version' => '1.41.11-1', 'arch' => 'i386'},
                 'bash' => {'version' => '4.1-3', 'arch' => 'i386'},