properly forget old info when rescanning...

This commit is contained in:
espie 2011-12-04 10:39:52 +00:00
parent 4a7ffc7718
commit 69df96b71c
2 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: Engine.pm,v 1.39 2011/12/02 11:52:06 espie Exp $
# $OpenBSD: Engine.pm,v 1.40 2011/12/04 10:39:52 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -644,6 +644,14 @@ sub rebuild_info
my @l = @{$self->{requeued}};
$self->{requeued} = [];
my %subdirs = map {($_->pkgpath_and_flavors, 1)} @l;
for my $v (@l) {
if (defined $v->{info}{FDEPENDS}) {
for my $f (values %{$v->{info}{FDEPENDS}}) {
$f->forget;
}
}
delete $v->{info};
}
$self->{state}->grabber->grab_subdirs($core, \%subdirs);
$core->mark_ready;
}

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: Fetch.pm,v 1.19 2011/12/03 11:10:48 espie Exp $
# $OpenBSD: Fetch.pm,v 1.20 2011/12/04 10:39:52 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -191,6 +191,14 @@ sub read_checksums
return $r;
}
sub forget
{
my $self = shift;
delete $self->{size};
delete $self->{sha};
delete $self->{okay};
}
sub build_distinfo
{
my ($self, $h, $fetch_only) = @_;