tweak find_dependencies to just return a result (deps or path)
reuse in can_be_junked. As exemplified by editors/tiled, a failing port with nojunk set should also prevent junk tentatives, as these will fail, but still untaint hosts... seen by aja@ and naddy@, most probably.
This commit is contained in:
parent
b907fe3b6a
commit
b364bd531d
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Port.pm,v 1.162 2015/05/18 16:35:15 espie Exp $
|
||||
# $OpenBSD: Port.pm,v 1.163 2015/05/24 06:48:51 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -627,7 +627,11 @@ sub run
|
||||
$self->handle_output($job);
|
||||
|
||||
my $h = $job->{builder}->locker->find_dependencies($core->hostname);
|
||||
if (defined $h && $self->add_live_depends($h, $core)) {
|
||||
if (!ref $h) {
|
||||
print "Can't run junk because of lock on $h\n";
|
||||
exit(2);
|
||||
}
|
||||
if ($self->add_live_depends($h, $core)) {
|
||||
$self->add_dontjunk($job, $h);
|
||||
my $opt = '-aIX';
|
||||
if ($core->prop->{nochecksum}) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Locks.pm,v 1.34 2015/05/07 12:30:46 espie Exp $
|
||||
# $OpenBSD: Locks.pm,v 1.35 2015/05/24 06:48:51 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -212,8 +212,8 @@ sub find_dependencies
|
||||
next if $cleaned;
|
||||
if (defined $host && $host eq $hostname) {
|
||||
if ($nojunk) {
|
||||
print "Can't run junk because of lock on $path\n";
|
||||
return undef;
|
||||
# XXX
|
||||
return $path;
|
||||
}
|
||||
for my $k (@d) {
|
||||
$h->{$k} = 1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Build.pm,v 1.12 2015/05/13 14:27:13 espie Exp $
|
||||
# $OpenBSD: Build.pm,v 1.13 2015/05/24 06:48:51 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -139,6 +139,10 @@ sub can_be_junked
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
my $h = $self->{engine}{locker}->find_dependencies($core->hostname);
|
||||
if (!ref $h) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user