sync ports with The Matrix
This commit is contained in:
parent
2c0afcbbf3
commit
b72ce7a5e9
1248 changed files with 11809 additions and 12798 deletions
|
@ -1,5 +1,5 @@
|
|||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Config.pm,v 1.95 2023/06/17 19:27:32 espie Exp $
|
||||
# $OpenBSD: Config.pm,v 1.97 2023/08/14 13:35:07 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
|
@ -221,6 +221,9 @@ sub parse_command_line($class, $state)
|
|||
$state->{subst}->add('CONTROL', '%L/control-%h-%$');
|
||||
$state->{external} = DPB::External->server($state);
|
||||
}
|
||||
if ($state->define_present('LISTING_HOST')) {
|
||||
$state->{listing_host} = $state->{subst}->value('LISTING_HOST');
|
||||
}
|
||||
$state->{external} //= DPB::ExternalStub->new;
|
||||
if ($state->{opt}{s}) {
|
||||
$state->{wantsize} = 1;
|
||||
|
@ -467,6 +470,48 @@ sub parse_hosts_file($class, $filename, $state, $rdefault, $override)
|
|||
}
|
||||
}
|
||||
|
||||
sub read_exceptions_file($class, $state, $filename, $default = 'build')
|
||||
{
|
||||
my $properties = {};
|
||||
open my $fh, '<', $filename or
|
||||
$state->fatal("Can't read exceptions file #1: #2",
|
||||
$filename, $!);
|
||||
$state->{adjuncts} = {};
|
||||
my @defaults = $default;
|
||||
while(<$fh>) {
|
||||
chomp;
|
||||
s/\#.*//;
|
||||
next if m/^\s*$/;
|
||||
my @paths;
|
||||
my @properties;
|
||||
for my $field (split(/\s+/, $_)) {
|
||||
if ($field =~ m/\//) {
|
||||
push(@paths, DPB::PkgPath->new($field));
|
||||
} elsif (defined $properties->{$field}) {
|
||||
push(@properties, $field);
|
||||
} else {
|
||||
$state->fatal(
|
||||
"Unknown property in file #1 at #2: #3",
|
||||
$filename, $., $field);
|
||||
}
|
||||
}
|
||||
if (@properties == 0) {
|
||||
@properties = @defaults;
|
||||
} else {
|
||||
@defaults = @properties;
|
||||
}
|
||||
if (@paths == 0) {
|
||||
$state->fatal("No path in file #1 at #2: #3",
|
||||
$filename, $., $_);
|
||||
}
|
||||
for my $p (@properties) {
|
||||
for my $v (@paths) {
|
||||
&{$properties->{$p}}($v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub add_host($class, $state, $host, @properties)
|
||||
{
|
||||
my $prop = DPB::HostProperties->new($state->{default_prop});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue