diff options
author | Norbert Preining <preining@logic.at> | 2017-05-11 03:13:32 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-05-11 03:13:32 +0000 |
commit | db860ff8fd9930cf62cc3ede28646f797958e82e (patch) | |
tree | bbe668ca1b3988820a7e295415f20842684d0421 /Master/tlpkg/TeXLive/TLPDB.pm | |
parent | 7925f1b113e65204670e5ffc7b5555ceebcf679e (diff) |
fixes for scheme size computation
git-svn-id: svn://tug.org/texlive/trunk@44290 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 0682343804e..c59768a1f95 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -1404,7 +1404,8 @@ sub _sizes_of_packages { my @expacks; if ($with_deps) { # don't expand collection->collection dependencies - @exppacks = $self->expand_dependencies('-no-collections', $self, @packs); + #@exppacks = $self->expand_dependencies('-no-collections', $self, @packs); + @exppacks = $self->expand_dependencies($self, @packs); } else { @exppacks = @packs; } @@ -1441,17 +1442,51 @@ sub _sizes_of_packages { $tlpsizes{'__TOTAL__'} = $totalsize; } my %realtlpsizes; - for my $p (@packs) { - $realtlpsizes{$p} = $tlpsizes{$p}; - if ($with_deps) { - # do a second round and compute the sizes with dependencies + if (!$with_deps) { + for my $p (@packs) { + $realtlpsizes{$p} = $tlpsizes{$p}; + } + } else { # the case with dependencies + # make three rounds: for packages, collections, schemes + # size computations include only those from lower-levels + # that is, scheme-scheme, collection-collection + # does not contribute to the size + for my $p (@exppacks) { + next if ($p =~ m/scheme-/); + next if ($p =~ m/collection-/); + $realtlpsizes{$p} = $tlpsizes{$p}; + } + for my $p (@exppacks) { + # only collections + next if ($p !~ m/collection-/); + $realtlpsizes{$p} = $tlpsizes{$p}; + ddebug("=== $p adding deps\n"); for my $d ($tlpobjs{$p}->depends) { - next if ($d =~ m/\.ARCH/); - next if ($d =~ m/\.win32/ && !TeXLive::TLUtils::member('win32', @archs)); next if ($d =~ m/^collection-/); next if ($d =~ m/^scheme-/); + ddebug("=== going for $d\n"); if (defined($tlpsizes{$d})) { $realtlpsizes{$p} += $tlpsizes{$d}; + ddebug("=== found $tlpsizes{$d} for $d\n"); + } else { + # silently ignore missing defined packages - they should have + # been computed by expand-dependencies + debug("TLPDB.pm: size with deps: sub package not found main=$d, dep=$p\n"); + } + } + } + for my $p (@exppacks) { + # only schemes + next if ($p !~ m/scheme-/); + $realtlpsizes{$p} = $tlpsizes{$p}; + ddebug("=== $p adding deps\n"); + for my $d ($tlpobjs{$p}->depends) { + # should not be necessary, we don't have collection -> scheme deps + next if ($d =~ m/^scheme-/); + ddebug("=== going for $d\n"); + if (defined($realtlpsizes{$d})) { + $realtlpsizes{$p} += $realtlpsizes{$d}; + ddebug("=== found $realtlpsizes{$d} for $d\n"); } else { # silently ignore missing defined packages - they should have # been computed by expand-dependencies |