]> git.donarmstrong.com Git - wannabuild.git/commitdiff
WB::QD: return arch=all-packages as arch-all-only (and ignore them for now)
authorAndreas Barth <aba@not.so.argh.org>
Sat, 9 Apr 2011 17:06:54 +0000 (17:06 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sat, 9 Apr 2011 17:06:54 +0000 (17:06 +0000)
bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index 6e09e8e11ab6865c54fee1d84739f2ad39c8845d..8a42f08483442918f3485e356cb21383d975905a 100755 (executable)
@@ -2360,8 +2360,9 @@ sub parse_all_v3 {
     foreach my $name (keys %$srcs) {
         next if $name eq '_binary';
 
-        # state = installed, out-of-date, uncompiled, packages-arch-specific, overwritten-by-arch-all, arch-not-in-arch-list
+        # state = installed, out-of-date, uncompiled, packages-arch-specific, overwritten-by-arch-all, arch-not-in-arch-list, arch-all-only
         my $pkgs = $srcs->{$name};
+        next if isin($pkgs->{'status'}, qw <arch-all-only>);
         my $pkg = $db->{$name};
 
         unless ($pkg) {
@@ -2388,9 +2389,11 @@ sub parse_all_v3 {
         if (isin($pkgs->{'status'}, qw (installed related)) && $pkgs->{'version'} eq $pkg->{'version'} && ($pkgs->{'binnmu'}//0) < int($pkg->{'binary_nmu_version'}//0)) {
                 $pkgs->{'status'} = 'out-of-date';
         }
-        if (isin($pkgs->{'status'}, qw <installed related arch-not-in-arch-list packages-arch-specific overwritten-by-arch-all>)) {
+        if (isin($pkgs->{'status'}, qw <installed related arch-not-in-arch-list packages-arch-specific overwritten-by-arch-all arch-all-only>)) {
             my $change = 0;
-            my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 'arch-not-in-arch-list' => 'Auto-Not-For-Us', 'packages-arch-specific' => 'Auto-Not-For-Us', 'overwritten-by-arch-all' => 'Auto-Not-For-Us'}->{$pkgs->{'status'}};
+            my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 
+                'arch-not-in-arch-list' => 'Auto-Not-For-Us', 'packages-arch-specific' => 'Auto-Not-For-Us', 'overwritten-by-arch-all' => 'Auto-Not-For-Us', 'arch-all-only' => 'Auto-Not-For-Us',
+                }->{$pkgs->{'status'}};
             next if isin( $pkg->{'state'}, qw<Not-For-Us Failed Failed-Removed Dep-Wait Dep-Wait-Removed>) && isin( $tstate, qw<Auto-Not-For-Us>);
             # if the package is currently current, the status is Installed, not not-for-us
             if ($pkg->{'state'} ne $tstate) {
@@ -2410,9 +2413,9 @@ sub parse_all_v3 {
                     $change++;
                 }
             }
-            if (isin($pkgs->{'status'}, qw <related packages-arch-specific overwritten-by-arch-all arch-not-in-arch-list>)) {
+            if (isin($pkgs->{'status'}, qw <related packages-arch-specific overwritten-by-arch-all arch-not-in-arch-list arch-all-only>)) {
                 my $tnotes = $pkgs->{'status'};
-                if ($pkg->{'notes'} && $pkg->{'notes'} ne $tnotes) {
+                if (($pkg->{'notes'}//"") ne $tnotes) {
                     $pkg->{'notes'} = $tnotes;
                     $change++;
                 }
index 6a1a067ba9bb110c2f9b5702f3d3b99f4eabf226..015f8a42afd5c14c8a77d587986ba140a0612231 100644 (file)
@@ -47,11 +47,9 @@ sub readsourcebins {
             /^Build-Conflicts:\s*(.*)$/mi and $p->{'conflicts'} = $1;
 
             next unless $p->{'name'} and $p->{'version'};
-            next if $p->{'arch'} eq 'all';
             foreach my $tarch (split(/\s+/, $p->{'arch'})) {
                 $p->{'for-us'} = 1 if debarch_is($arch, $tarch);
             }
-            delete $p->{'arch'};
 
             # ignore if package already exists with higher version
             if ($srcs->{$p->{'name'}}) {
@@ -113,9 +111,13 @@ sub readsourcebins {
         }
         delete $srcs->{$k}->{'for-us'};
 
-        #my $p = $pas->{$k};
-        #$p ||= $pas->{'%'.$k};
-        #$srcs->{$k}->{'status'} = 'not-for-us' if pasignore($p, $arch);
+        if ($srcs->{$k}->{'arch'} eq 'all') {
+            $srcs->{$k}->{'status'} = 'arch-all-only';
+            delete $srcs->{$k}->{'arch'};
+            next;
+        }
+        delete $srcs->{$k}->{'arch'};
+        
         if (pasignore($pas->{'%'.$k}, $arch)) {
             $srcs->{$k}->{'status'} = 'packages-arch-specific';
             next;
index 7007eefd419cc1bf4cc67197634ec56dd852133c..9d76f54381919742d946bc564ba8f56833cdf001 100755 (executable)
@@ -200,6 +200,36 @@ is_deeply ($$srcs, {
                               'depends' => 'debhelper [i386 amd64], bash [!kfreebsd-i386], perl [!i386 !amd64]',
                              'binary' => ['base-files'],
                             },
+            'haskall-dummy' => {
+                                 'priority' => 'extra',
+                                 'status' => 'arch-all-only',
+                                 'version' => '1:3',
+                                 'binary' => [
+                                               'libghc6-haxr-prof'
+                                             ],
+                                 'name' => 'haskall-dummy',
+                                 'section' => 'haskell'
+                               },
+            'all' => {
+                       'priority' => 'optional',
+                       'status' => 'arch-all-only',
+                       'version' => '4.1-3',
+                       'binary' => [
+                                     'all'
+                                   ],
+                       'name' => 'all',
+                       'section' => 'shell'
+                     },
+            'allbin' => {
+                          'priority' => 'optional',
+                          'status' => 'arch-all-only',
+                          'version' => '4.1-3',
+                          'binary' => [
+                                        'allbin'
+                                      ],
+                          'name' => 'allbin',
+                          'section' => 'shell'
+                        },
             'test' => {
                         'priority' => 'optional',
                         'status' => 'uncompiled',