diff options
author | Norbert Preining <preining@logic.at> | 2009-07-30 21:02:02 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-07-30 21:02:02 +0000 |
commit | 72781c08deb31e782a027b326e2938151f088433 (patch) | |
tree | 42045bbad69e825140dd876efe59b1d171b77641 /Master/tlpkg/etc | |
parent | cbb2432775077727b1b9becd39de4e0a5f5bbe05 (diff) |
more updates to tlmgr usermode, now paper works, and several other actions
warn if not already supported
git-svn-id: svn://tug.org/texlive/trunk@14496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/etc')
-rw-r--r-- | Master/tlpkg/etc/dev.usermode-tlmgr.patch | 152 |
1 files changed, 145 insertions, 7 deletions
diff --git a/Master/tlpkg/etc/dev.usermode-tlmgr.patch b/Master/tlpkg/etc/dev.usermode-tlmgr.patch index 35dc604c583..a961d916cb5 100644 --- a/Master/tlpkg/etc/dev.usermode-tlmgr.patch +++ b/Master/tlpkg/etc/dev.usermode-tlmgr.patch @@ -175,7 +175,112 @@ Index: texmf/scripts/texlive/tlmgr.pl } elsif ($action =~ m/^remove$/i) { action_remove(); } elsif ($action =~ /^paper$/) { -@@ -863,13 +885,14 @@ +@@ -469,6 +491,8 @@ + # + sub handle_execute_actions { + ++ my $sysmode = ($opts{"usermode"} ? "" : "-sys"); ++ + my $errors = 0; + + if ($::files_changed) { +@@ -501,14 +525,14 @@ + } + } + for my $m (keys %do_disable) { +- $errors += do_cmd_and_check("updmap-sys --nomkmap --nohash --disable $m"); ++ $errors += do_cmd_and_check("updmap$sysmode --nomkmap --nohash --disable $m"); + } + for my $m (keys %do_enable) { +- my $str = "updmap-sys --nomkmap --nohash --enable " . ++ my $str = "updmap$sysmode --nomkmap --nohash --enable " . + $::execute_actions{'enable'}{'maps'}{$m} . "=$m"; + $errors += do_cmd_and_check($str); + } +- $errors += do_cmd_and_check("updmap-sys") if $run_full; ++ $errors += do_cmd_and_check("updmap$sysmode") if $run_full; + } + + +@@ -550,7 +574,7 @@ + if ($opt_fmt && !$::regenerate_all_formats) { + for my $f (keys %do_enable) { + log ("(re)creating format dump $f\n"); +- $errors += do_cmd_and_check("fmtutil-sys --byfmt $f"); ++ $errors += do_cmd_and_check("fmtutil$sysmode --byfmt $f"); + $done_formats{$f} = 1; + } + +@@ -565,7 +589,7 @@ + for my $e (@upen) { + if ($def{'engine'} eq $e) { + log ("updating format $def{'name'} (engine $e updated)\n"); +- $errors += do_cmd_and_check("fmtutil-sys --byfmt $def{'name'}"); ++ $errors += do_cmd_and_check("fmtutil$sysmode --byfmt $def{'name'}"); + $done_formats{$def{'name'}} = 1; + } + } +@@ -607,7 +631,7 @@ + $lang = "$TEXMFSYSVAR/tex/generic/config/$lang"; + } + if ($localtlpdb->option("create_formats") && !$::regenerate_all_formats) { +- $errors += do_cmd_and_check("fmtutil-sys --byhyphen $lang"); ++ $errors += do_cmd_and_check("fmtutil$sysmode --byhyphen $lang"); + } + } + } +@@ -616,7 +640,7 @@ + # + if ($::regenerate_all_formats) { + info("Regenerating all formats, this may take some time ..."); +- $errors += do_cmd_and_check("fmtutil-sys --all"); ++ $errors += do_cmd_and_check("fmtutil$sysmode --all"); + info("done\n"); + $::regenerate_all_formats = 0; + } +@@ -788,8 +812,13 @@ + action_gui("config") if $opts{"gui"}; + + init_local_db(); +- chomp(my $texmfsysconfig = `kpsewhich -var-value=TEXMFSYSCONFIG`); +- $ENV{"TEXMFCONFIG"} = $texmfsysconfig; ++ my $texmfconfig; ++ if ($opts{"usermode"}) { ++ chomp($texmfconfig = `kpsewhich -var-value=TEXMFCONFIG`); ++ } else { ++ chomp($texmfconfig = `kpsewhich -var-value=TEXMFSYSCONFIG`); ++ } ++ $ENV{"TEXMFCONFIG"} = $texmfconfig; + + my $action = shift @ARGV; + if ($action =~ m/^paper$/i) { # generic paper +@@ -801,14 +830,14 @@ + "as in: tlmgr pdftex paper --list\n"); + + } elsif (!defined($newpaper)) { # tlmgr paper => show all current sizes. +- TeXLive::TLPaper::paper_all($texmfsysconfig,undef); ++ TeXLive::TLPaper::paper_all($texmfconfig,undef); + + } elsif ($newpaper !~ /^(a4|letter)$/) { # tlmgr paper junk => complain. + $newpaper = "the empty string" if !defined($newpaper); + tlwarn("tlmgr: expected `a4' or `letter' after paper, not $newpaper\n"); + + } else { # tlmgr paper {a4|letter} => do it. +- TeXLive::TLPaper::paper_all($texmfsysconfig,$newpaper); ++ TeXLive::TLPaper::paper_all($texmfconfig,$newpaper); + } + + } else { # program-specific paper +@@ -822,7 +851,7 @@ + # the do_paper progs check for the argument --list, so if given + # restore it to the cmd line. + unshift(@ARGV, "--list") if $opts{"list"}; +- TeXLive::TLPaper::do_paper($prog,$texmfsysconfig,@ARGV); ++ TeXLive::TLPaper::do_paper($prog,$texmfconfig,@ARGV); + } + } + +@@ -863,13 +892,14 @@ # include arbitrary package in the list of collections, but # only collectons: @colls = grep {m;^collection-;} @colls; @@ -197,7 +302,18 @@ Index: texmf/scripts/texlive/tlmgr.pl if ($opts{"list"}) { if ($tlp->category eq "Collection" || $tlp->category eq "Scheme") { # in the case of collections of schemes we list the deps -@@ -1380,17 +1403,19 @@ +@@ -933,6 +963,10 @@ + # SYMLINKS + # + sub action_path { ++ if ($opts{"usermode"}) { ++ tlwarn("action `path' not supported in usermode!\n"); ++ exit 1; ++ } + my $what = shift @ARGV; + if (!defined($what) || ($what !~ m/^(add|remove)$/i)) { + tlwarn("action path needs one argument, either add or remove\n"); +@@ -1380,17 +1414,19 @@ } } if ($other_updates_asked_for && !$opts{"self"}) { @@ -227,7 +343,7 @@ Index: texmf/scripts/texlive/tlmgr.pl } } } -@@ -1808,7 +1833,8 @@ +@@ -1808,7 +1844,8 @@ if ($opts{"backup"} && !$opts{"dry-run"}) { $tlp->make_container("xz", $root, @@ -237,7 +353,7 @@ Index: texmf/scripts/texlive/tlmgr.pl $unwind_package = "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.xz"; -@@ -1988,16 +2014,18 @@ +@@ -1988,16 +2025,18 @@ $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"}; init_tlmedia(); @@ -265,7 +381,7 @@ Index: texmf/scripts/texlive/tlmgr.pl } } } -@@ -2034,6 +2062,15 @@ +@@ -2034,6 +2073,15 @@ } } foreach my $pkg (@inst_packs, @inst_colls, @inst_schemes) { @@ -281,7 +397,29 @@ Index: texmf/scripts/texlive/tlmgr.pl my $re = ""; if (defined($localtlpdb->get_package($pkg))) { if ($opts{"reinstall"}) { -@@ -3119,6 +3156,34 @@ +@@ -2239,6 +2287,10 @@ + if ($^O=~/^MSWin(32|64)$/i) { + warn("action `arch' not supported on Windows\n"); + } ++ if ($opts{"usermode"}) { ++ tlwarn("action `arch' not supported in usermode\n"); ++ exit 1; ++ } + if ($opts{"gui"}) { + action_gui("arch"); + } +@@ -2320,6 +2372,10 @@ + # GENERATE + # + sub action_generate { ++ if ($opts{"usermode"}) { ++ tlwarn("action `generate' not supported in usermode!\n"); ++ exit 1; ++ } + my $dest = defined($opts{"dest"}) ? $opts{"dest"} : ""; + my $localconf = defined($opts{"localcfg"}) ? $opts{"localcfg"} : ""; + my $what = shift @ARGV; +@@ -3119,6 +3175,34 @@ # @@ -316,7 +454,7 @@ Index: texmf/scripts/texlive/tlmgr.pl # action conf # tries to mimick texconfig conf but probably will add some more things # -@@ -3182,10 +3247,10 @@ +@@ -3182,10 +3266,10 @@ # stuff changed via the GUI return if defined $localtlmedia; return if defined $localtlpdb; |