From: Kurt Roeckx Date: Mon, 18 Jan 2010 23:24:36 +0000 (+0000) Subject: Don't requests all the packages again in the same function X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=962a32a3fd03a1106b222fd500f9b8de75353911 Don't requests all the packages again in the same function It was even in the same variable name. We just make sure we properly update it now. --- diff --git a/bin/wanna-build b/bin/wanna-build index f24b522..6341659 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -1197,6 +1197,7 @@ sub parse_sources { "from database, because now Arch: all\n" if $verbose; del_source_info($name); + delete $db->{$name}; next; } @@ -1224,7 +1225,6 @@ sub parse_sources { } # remove installed packages that no longer have source available # or binaries installed - my $db = get_all_source_info(); foreach $name (keys %$db) { next if $name =~ /^_/; my $pkg = $db->{$name}; @@ -1236,6 +1236,7 @@ sub parse_sources { "not in Sources anymore\n" if $verbose; del_source_info($name); + delete $db->{$name}; } else { next if !isin( $pkg->{'state'}, qw(Installed) ); if ($full && not defined $merge_srcvers{$name}) { @@ -1246,6 +1247,7 @@ sub parse_sources { "binaries don't exist anymore\n" if $verbose; del_source_info($name); + delete $db->{$name}; } elsif ($full && version_less( $merge_srcvers{$name}, $pkg->{'version'})) { print "$name ($pkg->{'version'}): ". "package is Installed but binaries are from ".