]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Merge branch 'master' of /srv/buildd.debian.org/git/wanna-build
authorKurt Roeckx <kurt@roeckx.be>
Sat, 9 Apr 2011 18:50:05 +0000 (18:50 +0000)
committerKurt Roeckx <kurt@roeckx.be>
Sat, 9 Apr 2011 18:50:05 +0000 (18:50 +0000)
bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index d3faced3acc6a955e3c297c9205ae88d6d87a547..8a42f08483442918f3485e356cb21383d975905a 100755 (executable)
@@ -2360,12 +2360,13 @@ sub parse_all_v3 {
     foreach my $name (keys %$srcs) {
         next if $name eq '_binary';
 
-        # state = installed, out-of-date, uncompiled, not-for-us, auto-not-for-us
+        # 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) {
-            next SRCS if $pkgs->{'status'} eq 'not-for-us';
+            next SRCS if $pkgs->{'status'} eq 'packages-arch-specific';
             my $logstr = sprintf("merge-v3 %s %s_%s (%s, %s):", $vars->{'time'}, $name, $pkgs->{'version'}, $vars->{'arch'}, $vars->{'suite'});
 
             # does at least one binary exist in the database and is more recent - if so, we're probably just outdated, ignore the source package
@@ -2383,14 +2384,16 @@ sub parse_all_v3 {
             ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : "").
             sprintf(" (%s, %s, previous: %s", $vars->{'arch'}, $vars->{'suite'}, $pkg->{'version'}//"").
             ($pkg->{'binary_nmu_version'} ? ";b".$pkg->{'binary_nmu_version'} : "").
-            ", $pkg->{'state'}):";
+            ", $pkg->{'state'}".($pkg->{'notes'} ? "/".$pkg->{'notes'} : "")."):";
 
         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 auto-not-for-us))) {
+        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', 'auto-not-for-us' => '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,12 @@ sub parse_all_v3 {
                     $change++;
                 }
             }
-            if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") {
-                $pkg->{'notes'} = "related";
-                $change++;
+            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'}//"") ne $tnotes) {
+                    $pkg->{'notes'} = $tnotes;
+                    $change++;
+                }
             }
             if ($change) {
                 print "$logstr set to $tstate/".($pkg->{'notes'}//"")."\n" if $verbose || $simulate;
@@ -2422,21 +2428,6 @@ sub parse_all_v3 {
             next;
         }
 
-        if ($pkgs->{'status'} eq 'not-for-us') {
-            next if isin( $pkg->{'state'}, qw(Not-For-Us Installed Failed-Removed));
-
-            if (isin( $pkg->{'state'}, qw(Failed Build-Attempted Built))) {
-                change_state( \$pkg, "Failed-Removed" );
-               log_ta( $pkg, "--merge-v3: Failed-Removed" ) unless $simulate;
-               update_source_info($pkg) unless $simulate;
-                print "$logstr (virtually) deleted from database\n" if $verbose || $simulate;
-                next;
-            }
-
-            print "$logstr should delete (not-for-us according to P-a-s)\n" if $verbose || $simulate || 1; # not implemented yet on purpose
-            next;
-        }
-
         # only uncompiled / out-of-date are left, so check if anything new
         if (!(isin($pkgs->{'status'}, qw (uncompiled out-of-date)))) {
             print "$logstr package in unknown state: $pkgs->{'status'}\n";
index 5f84d5ebe065b12a7b6cb6ac65e2afa82b16d6b1..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'}}) {
@@ -109,23 +107,33 @@ sub readsourcebins {
         $srcs->{$k}->{'status'} = 'installed' if $srcs->{$k}->{'arch'} && $srcs->{$k}->{'arch'} eq 'all';
         
         if (!$srcs->{$k}->{'for-us'} && $srcs->{$k}->{'status'} ne 'installed') {
-            $srcs->{$k}->{'status'} = 'auto-not-for-us';
+            $srcs->{$k}->{'status'} = 'arch-not-in-arch-list';
         }
         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'} = 'not-for-us';
+            $srcs->{$k}->{'status'} = 'packages-arch-specific';
             next;
         }
         for my $bin (@{$srcs->{$k}->{'binary'}}) {
+            $srcs->{$k}->{'pas'} = 1 if pasignore($pas->{$bin}, $arch);
             next if pasignore($pas->{$bin}, $arch);
             next if $binary->{$bin} and $binary->{$bin}->{'arch'} eq 'all';
             next SRCS;
         }
-        $srcs->{$k}->{'status'} = 'not-for-us';
+        if ($srcs->{$k}->{'pas'}) {
+            $srcs->{$k}->{'status'} = 'packages-arch-specific';
+        } else {
+            $srcs->{$k}->{'status'} = 'overwritten-by-arch-all';
+        }
+        delete $srcs->{$k}->{'pas'};
     }
     $srcs->{'_binary'} = $binary;
     local($/) = "\n";
index a0fc99c62b14526eb0666357701ce69ee7498705..9d76f54381919742d946bc564ba8f56833cdf001 100755 (executable)
@@ -90,6 +90,20 @@ Priority: optional
 Section: sound
 Architecture: any
 
+Package: haskell-haxr
+Binary: libghc6-haxr-prof
+Version: 3000.2.1-2
+Priority: extra
+Section: haskell
+Architecture: any
+
+Package: haskall-dummy
+Binary: libghc6-haxr-prof
+Version: 1:3
+Priority: extra
+Section: haskell
+Architecture: all
+
 EOF
 ;
 
@@ -138,6 +152,12 @@ Installed-Size: 112
 Architecture: all
 Version: 3.0-3
 
+Package: libghc6-haxr-prof
+Version: 1:3
+Priority: extra
+Section: haskell
+Architecture: all
+
 EOF
 ;
 
@@ -180,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',
@@ -190,7 +240,7 @@ is_deeply ($$srcs, {
                       },
             'nfu' => {
                         'priority' => 'optional',
-                        'status' => 'not-for-us',
+                        'status' => 'packages-arch-specific',
                         'version' => '4.1-3',
                         'name' => 'nfu',
                         'section' => 'shell',
@@ -198,7 +248,7 @@ is_deeply ($$srcs, {
                       },
             'autonfu' => {
                         'priority' => 'required',
-                        'status' => 'auto-not-for-us',
+                        'status' => 'arch-not-in-arch-list',
                         'version' => '1.41.11-1',
                         'name' => 'autonfu',
                         'section' => 'admin',
@@ -214,7 +264,7 @@ is_deeply ($$srcs, {
                       },
             'pbuilder' => {
                             'priority' => 'extra',
-                            'status' => 'not-for-us',
+                            'status' => 'packages-arch-specific',
                             'version' => '0.196',
                             'binary' => [
                                           'pbuilder',
@@ -235,6 +285,16 @@ is_deeply ($$srcs, {
                 'name' => 'lv2core',
                 'section' => 'sound'
             },
+            'haskell-haxr' => {
+                'priority' => 'extra',
+                'status' => 'overwritten-by-arch-all',
+                'version' => '3000.2.1-2',
+                'binary' => [
+                        'libghc6-haxr-prof'
+                      ],
+                'name' => 'haskell-haxr',
+                'section' => 'haskell'
+            },
             '_binary' => {
                 'e2fsprogs' => {'version' => '1.41.11-1', 'arch' => 'i386'},
                 'bash' => {'version' => '4.1-3', 'arch' => 'i386'},
@@ -242,5 +302,6 @@ is_deeply ($$srcs, {
                 'bash-static' => {'version' => '4.1-3', 'arch' => 'i386'},
                 'all' => {'version' => '4.1-3', 'arch' => 'all'},
                 'pbuilder' => { 'arch' => 'all', 'version' => '0.196' },
+                'libghc6-haxr-prof' => { 'arch' => 'all', 'version' => '1:3' },
             },
 }, 'reading packages');