diff options
author | Karl Berry <karl@freefriends.org> | 2018-10-31 18:11:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-10-31 18:11:57 +0000 |
commit | 804ed7ce7196cf360741cbec749e065de884151d (patch) | |
tree | d0bc76a6c3e10413cb1abee037a1c627dd9e18b1 | |
parent | 6b14f01d8bc6ec2953cb100790a400d1b335aa4b (diff) |
(make_tlpobj): avoid adding self-dep, instead of
removing it after (committing for Norbert).
git-svn-id: svn://tug.org/texlive/trunk@49037 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 302e72b10bb..b348984fcfd 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -285,6 +285,7 @@ sub make_tlpobj { # convert each fmttrigger to a depend line, if not already present. if (defined($tlp->executes)) { # else no fmttriggers my @deps = (defined($tlp->depends) ? $tlp->depends : ()); + my $tlpname = $tlp->name; for my $e ($tlp->executes) { # we only check for AddFormat lines if ($e =~ m/^\s*AddFormat\s+(.*)\s*$/) { @@ -292,17 +293,13 @@ sub make_tlpobj { if (defined($fmtline{"error"})) { tlwarn ("error in parsing $e for return hash: $fmtline{error}\n"); } else { - TeXLive::TLUtils::push_uniq (\@deps, @{$fmtline{'fmttriggers'}}); - $tlp->depends(@deps); + # make sure that we don't add circular deps + TeXLive::TLUtils::push_uniq (\@deps, + grep { $_ ne $tlpname } @{$fmtline{'fmttriggers'}}); } } } - # we might have added the package name itself to its dependencies due - # to the parse_AddFormat_line. Remove it - @deps = (defined($tlp->depends) ? $tlp->depends : ()); - my $tlpname = $tlp->name; - my @newdeps = grep { $_ ne $tlpname } @deps; - $tlp->depends(@newdeps); + $tlp->depends(@deps); } my $filemax; |