From cf7212491a441c8a2d2c4dde37d712af3d7408ed Mon Sep 17 00:00:00 2001 From: Andreas Barth Date: Sun, 6 Jun 2010 18:48:47 +0000 Subject: [PATCH] fix another bug: update package even if it stays in installed --- bin/wanna-build | 23 ++++++++++++++++------- lib/WB/QD.pm | 1 - 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bin/wanna-build b/bin/wanna-build index 9cc19c8..f8d5721 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -3,6 +3,7 @@ # wanna-build: coordination script for Debian buildds # Copyright (C) 1998 Roman Hodek # Copyright (C) 2005-2008 Ryan Murray +# Copyright (C) 2010 Andreas Barth # # 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; diff --git a/lib/WB/QD.pm b/lib/WB/QD.pm index f02378d..059d6b6 100644 --- a/lib/WB/QD.pm +++ b/lib/WB/QD.pm @@ -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={}; -- 2.39.2