From daaf8dca463d79a43a638a1378aa0b3c6810ff68 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 21 Nov 2018 00:29:16 +0000 Subject: support TEXLIVE_PREFER_OWN env var for setup_programs git-svn-id: svn://tug.org/texlive/trunk@49206 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLUtils.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Master/tlpkg/TeXLive/TLUtils.pm') diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 2fc77fff769..5a7d95b420d 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -2348,6 +2348,18 @@ sub setup_programs { my ($bindir, $platform, $tlfirst) = @_; my $ok = 1; + # tlfirst is (currently) not passed in by either the installer or + # tlmgr, so it will be always false. + # If it is not defined, we check for the env variable + # TEXLIVE_PREFER_OWN + # + if (!defined($tlfirst)) { + if ($ENV{'TEXLIVE_PREFER_OWN'}) { + debug("setup_programs: TEXLIVE_PREFER_OWN is set!"); + $tlfirst = 1; + } + } + debug("setup_programs: preferring " . ($tlfirst ? "TL" : "system") . " versions\n"); my $isWin = ($^O =~ /^MSWin/i); -- cgit v1.2.3