stop lying, we are not creating a new host.
incidentally: wipe can't wipe locks from a different configuration with a host that's not actually running.
This commit is contained in:
parent
b774514f73
commit
7443990ca9
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: External.pm,v 1.16 2019/05/12 14:09:11 espie Exp $
|
||||
# $OpenBSD: External.pm,v 1.17 2019/05/15 13:53:17 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -87,11 +87,15 @@ sub wipe
|
||||
$fh->print($p, " is still running\n");
|
||||
return;
|
||||
}
|
||||
$fh->print("cleaning up $info->{locked}\n");
|
||||
my $w = DPB::PkgPath->new($info->{locked});
|
||||
# steal a temporary core
|
||||
$state->engine->wipe($w,
|
||||
DPB::Core->new_noreg(DPB::Host->new($info->{host})));
|
||||
my $h = DPB::Host->retrieve($info->{host});
|
||||
if (!defined $h) {
|
||||
$fh->print("Can't run wipe on $info->{host}\n");
|
||||
} else {
|
||||
$fh->print("cleaning up $info->{locked}\n");
|
||||
my $w = DPB::PkgPath->new($info->{locked});
|
||||
# steal a temporary core
|
||||
$state->engine->wipe($w, DPB::Core->new_noreg($h));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Host.pm,v 1.9 2019/05/08 18:26:43 espie Exp $
|
||||
# $OpenBSD: Host.pm,v 1.10 2019/05/15 13:53:17 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -49,6 +49,11 @@ sub new
|
||||
return $hosts->{$name};
|
||||
}
|
||||
|
||||
sub retrieve
|
||||
{
|
||||
my ($class, $name) = @_;
|
||||
return $hosts->{$name};
|
||||
}
|
||||
sub fetch_host
|
||||
{
|
||||
my ($class, $prop) = @_;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Rebuild.pm,v 1.5 2019/05/09 11:05:36 espie Exp $
|
||||
# $OpenBSD: Rebuild.pm,v 1.6 2019/05/15 13:53:17 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -30,7 +30,8 @@ sub init
|
||||
"file:/$self->{fullrepo}", $self->{state});
|
||||
$self->{repository}{trusted} = 1;
|
||||
# this is just a dummy core, for running quick pipes
|
||||
$self->{core} = DPB::Core->new_noreg(DPB::Host->new('localhost'));
|
||||
# XXX but does it exist ?... rebuild requires localhost
|
||||
$self->{core} = DPB::Core->new_noreg(DPB::Host->retrieve('localhost'));
|
||||
}
|
||||
|
||||
my $uptodate = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user