]> git.donarmstrong.com Git - wannabuild.git/commitdiff
mark overwritten by arch-all-packages as auto-not-for-us
authorAndreas Barth <aba@not.so.argh.org>
Sat, 9 Apr 2011 12:53:00 +0000 (12:53 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sat, 9 Apr 2011 12:53:49 +0000 (12:53 +0000)
(and prepare auto-not-for-us for all all- and pas-packages)

bin/wanna-build
lib/WB/QD.pm
tests/qd.pl

index d3faced3acc6a955e3c297c9205ae88d6d87a547..7993d6bd04ed592878975b4cce63102db12b3abf 100755 (executable)
@@ -2388,9 +2388,9 @@ 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 auto-not-for-us))) {
+        if (isin($pkgs->{'status'}, qw <installed related auto-not-for-us >)) {
             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', 'auto-not-for-us' => 'Auto-Not-For-Us', 'not-for-us' => '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,8 +2410,15 @@ sub parse_all_v3 {
                     $change++;
                 }
             }
-            if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") {
-                $pkg->{'notes'} = "related";
+            if (isin($pkgs->{'status'}, qw <related not-for-us>)) {
+                my $tnotes = {'related' => 'related', 'not-for-us' => 'Packages-arch-specific'}->{$pkgs->{'status'}};
+                if ($pkg->{'notes'} && $pkg->{'notes'} ne $tnotes) {
+                    $pkg->{'notes'} = $tnotes;
+                    $change++;
+                }
+            }
+            if ($pkgs->{'notes'} && ($pkg->{'notes'}//"" ne $pkgs->{'notes'})) {
+                $pkg->{'notes'} = $pkgs->{'notes'};
                 $change++;
             }
             if ($change) {
index 5f84d5ebe065b12a7b6cb6ac65e2afa82b16d6b1..01eea54354c1cb19862ff1543716447981462e3a 100644 (file)
@@ -121,11 +121,19 @@ sub readsourcebins {
             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'} = 'not-for-us';
+            $srcs->{$k}->{'notes'} = 'packages-arch-specific';
+        } else {
+            $srcs->{$k}->{'status'} = 'auto-not-for-us';
+            $srcs->{$k}->{'notes'} = 'overwritten-by-arch-all';
+        }
+        delete $srcs->{$k}->{'pas'};
     }
     $srcs->{'_binary'} = $binary;
     local($/) = "\n";
index a0fc99c62b14526eb0666357701ce69ee7498705..720f125988c4e6973b0e3aaa36c9a62b088180a0 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
 ;
 
@@ -215,6 +235,7 @@ is_deeply ($$srcs, {
             'pbuilder' => {
                             'priority' => 'extra',
                             'status' => 'not-for-us',
+                            'notes' => 'packages-arch-specific',
                             'version' => '0.196',
                             'binary' => [
                                           'pbuilder',
@@ -235,6 +256,17 @@ is_deeply ($$srcs, {
                 'name' => 'lv2core',
                 'section' => 'sound'
             },
+            'haskell-haxr' => {
+                'priority' => 'extra',
+                'status' => 'auto-not-for-us',
+                'notes' => '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 +274,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');