From cd736207e9162131a663b73c60cc8d1bfb47b655 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 17 Apr 2008 20:36:48 +0000 Subject: fix 2 bugs in install-menu-perltk git-svn-id: svn://tug.org/texlive/trunk@7476 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-menu-perltk.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index bb2efcc8c17..d8a178f7a76 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -605,7 +605,7 @@ sub menu_set_pathes_text { menu_set_text($texdirtext, $text{'notwritable'}); } menu_set_text($texmflocaltext, "$vars{'TEXMFLOCAL'}"); - if (-w $vars{'TEXMFSYSVAR'}) { + if ((-w $vars{'TEXMFSYSVAR'}) || (-w dirname($vars{'TEXMFSYSVAR'}))) { menu_set_text($texmfsysvartext, "$vars{'TEXMFSYSVAR'}"); } elsif ("$vars{'TEXMFSYSVAR'}" =~ m;^$vars{'TEXDIR'};) { if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) { @@ -659,12 +659,15 @@ sub callback_edit_directories { $vars{'TEXDIR'} =~ s/^~/$home/; $vars{'TEXMFLOCAL'} =~ s/^~/$home/; $vars{'TEXMFSYSVAR'} =~ s/^~/$home/; - if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) { - $vars{'TEXMFLOCAL'}="$1/texmf-local"; - $vars{'TEXMFSYSVAR'}="$1/$texlive_release/texmf-var"; - } elsif ($vars{'TEXDIR'}=~/^(.*)$/) { - $vars{'TEXMFLOCAL'}="$1/texmf-local"; - $vars{'TEXMFSYSVAR'}="$1/texmf-var"; + # only if we set TEXDIR we set the others in parallel + if ($key eq "TEXDIR") { + if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) { + $vars{'TEXMFLOCAL'}="$1/texmf-local"; + $vars{'TEXMFSYSVAR'}="$1/$texlive_release/texmf-var"; + } elsif ($vars{'TEXDIR'}=~/^(.*)$/) { + $vars{'TEXMFLOCAL'}="$1/texmf-local"; + $vars{'TEXMFSYSVAR'}="$1/texmf-var"; + } } menu_update_texts(); } -- cgit v1.2.3