]> git.donarmstrong.com Git - wannabuild.git/commitdiff
fix another bug: update package even if it stays in installed
authorAndreas Barth <aba@not.so.argh.org>
Sun, 6 Jun 2010 18:48:47 +0000 (18:48 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sun, 6 Jun 2010 18:48:47 +0000 (18:48 +0000)
bin/wanna-build
lib/WB/QD.pm

index 9cc19c8f77693ca85b776ab0b89c07bacb86f0eb..f8d572142fdc6037360249b3b6496718d476a00d 100755 (executable)
@@ -3,6 +3,7 @@
 # wanna-build: coordination script for Debian buildds
 # Copyright (C) 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
 # Copyright (C) 2005-2008 Ryan Murray <rmurray@debian.org>
+# Copyright (C) 2010      Andreas Barth <aba@not.so.argh.org>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -2951,16 +2952,24 @@ sub parse_all_v3() {
                 $pkgs->{'status'} = 'out-of-date';
         }
         if (isin($pkgs->{'status'}, qw (installed related))) {
+            my $change = 0;
             if ($pkg->{'state'} ne 'Installed') {
                 change_state( \$pkg, 'Installed');
-                $pkg->{'version'} = $pkgs->{'version'};
-                $pkg->{'installed_version'} = $pkgs->{'version'};
-                $pkg->{'binary_nmu_version'} = $pkgs->{'binnmu'};
-                $pkg->{'section'} = $pkgs->{'section'};
-                $pkg->{'priority'} = $pkgs->{'priority'};
-                if (isin($pkgs->{'status'}, qw (related))) {
-                    $pkg->{'notes'} = "related";
+                delete $pkg->{'depends'};
+                $change++;
+            }
+            my $attrs = { 'version' => 'version', 'installed_version' => 'version', 'binary_nmu_version' => 'binnmu', 'section' => 'section', 'priority' => 'priority' };
+            foreach my $k (keys %$attrs) {
+                if ($pkg->{$k} ne $pkgs->{$attrs->{$k}}) {
+                    $pkg->{$k} = $pkgs->{$attrs->{$k}};
+                    $change++;
                 }
+            }
+            if (isin($pkgs->{'status'}, qw (related))) {
+                $pkg->{'notes'} = "related";
+                $change++;
+            }
+            if ($change) {
                 print "$logstr set to installed/".$pkg->{'notes'}."\n" if $verbose || $simulate;
                 log_ta( $pkg, "--merge-v3: installed" ) unless $simulate;
                 update_source_info($pkg) unless $simulate;
index f02378dfa89e8db5f208d35923cff3ef011195de..059d6b67433a2e097b51a8c630fb138ecd492222 100644 (file)
@@ -27,7 +27,6 @@ sub readsourcebins {
     local($/) = ""; # read in paragraph mode
 
     foreach my $s (@$SRC) {
-        print "SRC: $s\n";
         my $S = new IO::Uncompress::AnyInflate($s) || return "WB::QD::SRC can't open $s";
         while(<$S>) {
             my $p={};