diff --git a/infrastructure/bin/dpb b/infrastructure/bin/dpb index 8c381cfaefc..c8b14d1c59f 100755 --- a/infrastructure/bin/dpb +++ b/infrastructure/bin/dpb @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: dpb,v 1.19 2011/05/22 08:21:38 espie Exp $ +# $OpenBSD: dpb,v 1.20 2011/05/29 11:06:23 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -90,7 +90,7 @@ sub handle_options }; $state->SUPER::handle_options('aceqrRsuUh:xA:f:j:m:P:b:L:S:t:T:', - "[-acerRsuUx] [-A arch] [-j N] [-P plist] [-h hosts] [-L logdir]", + "[-acerRsuUx] [-A arch] [-f N] [-j N] [-P plist] [-h hosts] [-L logdir]", "[-b log] [-t ctimeout] [-m threshold] [path ...]"); $state->{fullrepo} = join("/", $state->{repo}, $state->arch, "all"); $state->{logdir} //= $ENV{LOGDIR} // @@ -381,6 +381,9 @@ if (!$state->opt('e')) { if ($state->{all}) { $state->engine->dump_dependencies; + if ($state->opt('f')) { + DPB::Distfile->dump($state->{logger}); + } } #$state->engine->dump($dump); $state->engine->check_buildable; diff --git a/infrastructure/lib/DPB/Fetch.pm b/infrastructure/lib/DPB/Fetch.pm index 136122280c0..154a5fc8d70 100644 --- a/infrastructure/lib/DPB/Fetch.pm +++ b/infrastructure/lib/DPB/Fetch.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Fetch.pm,v 1.8 2011/05/27 13:13:43 espie Exp $ +# $OpenBSD: Fetch.pm,v 1.9 2011/05/29 11:06:23 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -55,6 +55,15 @@ sub new $cache->{$full} //= $class->create($full, $file, @r); } +sub dump +{ + my ($class, $logger) = @_; + my $log = $logger->create("fetch/distfiles"); + for my $f (sort map {$_->{name}} values %$cache) { + print $log $f, "\n"; + } +} + sub logname { my $self = shift; @@ -175,7 +184,8 @@ sub build_distinfo for my $v (values %$h) { my $info = $v->{info}; next unless defined $info->{DISTFILES} || - defined $info->{PATCHFILES}; + defined $info->{PATCHFILES} || + defined $info->{SUPDISTFILES}; my $dir = $info->{DIST_SUBDIR}; my $checksum_file = $info->{CHECKSUM_FILE}; @@ -189,22 +199,29 @@ sub build_distinfo my $checksums = $distinfo->{$checksum_file}; my $files = {}; - - for my $d ((keys %{$info->{DISTFILES}}), (keys %{$info->{PATCHFILES}})) { + my $build = sub { + my $arg = shift; my $site = 'MASTER_SITES'; - if ($d =~ m/^(.*)\:(\d)$/) { - $d = $1; + if ($arg =~ m/^(.*)\:(\d)$/) { + $arg = $1; $site.= $2; } if (!defined $info->{$site}) { - die "Can't find $site for $d"; + die "Can't find $site for $arg"; } - my $file = DPB::Distfile->new($d, $dir, + return DPB::Distfile->new($arg, $dir, $info->{$site}, $checksums, $v, $self->{distdir}); + }; + + for my $d ((keys %{$info->{DISTFILES}}), (keys %{$info->{PATCHFILES}})) { + my $file = &$build($d); $files->{$file} = $file; } + for my $d (keys %{$info->{SUPDISTFILES}}) { + &$build($d); + } for my $k (qw(DIST_SUBDIR CHECKSUM_FILE DISTFILES - PATCHFILES MASTER_SITES MASTER_SITES0 + PATCHFILES SUPDISTFILES MASTER_SITES MASTER_SITES0 MASTER_SITES1 MASTER_SITES2 MASTER_SITES3 MASTER_SITES4 MASTER_SITES5 MASTER_SITES6 MASTER_SITES7 MASTER_SITES8 MASTER_SITES9)) { diff --git a/infrastructure/lib/DPB/PortInfo.pm b/infrastructure/lib/DPB/PortInfo.pm index 89a9b93272f..b1a1f359652 100644 --- a/infrastructure/lib/DPB/PortInfo.pm +++ b/infrastructure/lib/DPB/PortInfo.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PortInfo.pm,v 1.7 2011/05/22 08:21:39 espie Exp $ +# $OpenBSD: PortInfo.pm,v 1.8 2011/05/29 11:06:23 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -177,6 +177,7 @@ my %adder = ( BNEEDED_BY => "AddDepends", DISTFILES => 'AddList', PATCHFILES => 'AddList', + SUPDISTFILES => 'AddList', DIST_SUBDIR => 'AddInfo', CHECKSUM_FILE => 'AddInfo', FETCH_MANUALLY => 'FetchManually',