From 3dda18b19cb24049cb777e6a1bd14660a9099765 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 8 Jan 2015 17:14:37 +0000 Subject: new options --with-doc and --with-src to be used with install --reinstall git-svn-id: svn://tug.org/texlive/trunk@35994 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/NEWS | 4 ++ Master/texmf-dist/scripts/texlive/tlmgr.pl | 59 ++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 15 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS index 04210c783b8..d99e61f420f 100644 --- a/Master/texmf-dist/scripts/texlive/NEWS +++ b/Master/texmf-dist/scripts/texlive/NEWS @@ -1,6 +1,10 @@ (This file public domain. Originally written by Norbert Preining and Karl Berry, 2010.) +
  • add --with-doc and --with-src options for use with install --reinstall, +to get the doc and/or src files even if they were omitted at initial +installation. +

    tlmgr revision 35841 (released 24dec14):

  • remove taxonomy searching, since upstream data is no longer maintained. diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index a7465c7d01c..699b71c2bf6 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -166,6 +166,8 @@ sub main { "install" => { "dry-run|n" => 1, "file" => 1, "force" => 1, + "with-doc" => 1, + "with-src" => 1, "no-depends" => 1, "no-depends-at-all" => 1, "reinstall" => 1}, @@ -376,7 +378,7 @@ for the full story.\n"; } if (@notvalidargs) { my $msg = - "The following arguments are not supported for the action $action:\n"; + "The following options are not supported for the action $action:\n"; for my $c (@notvalidargs) { $msg .= " $c"; } @@ -3320,6 +3322,13 @@ sub action_install { # return if there is nothing to install! return if (!@todo); + my $orig_do_src = $localtlpdb->option("install_srcfiles"); + my $orig_do_doc = $localtlpdb->option("install_docfiles"); + if (!$opts{"dry-run"}) { + $localtlpdb->option("install_srcfiles", 1) if $opts{'with-src'}; + $localtlpdb->option("install_docfiles", 1) if $opts{'with-doc'}; + } + my $currnr = 1; # undef here is a ref to array of platforms, if undef all are used my %sizes = %{$remotetlpdb->sizes_of_packages( @@ -3386,9 +3395,16 @@ sub action_install { $currnr++; } print "end-of-updates\n" if $::machinereadable; + + if ($opts{"dry-run"}) { # stop here, don't do any postinstall actions return(0); + } else { + # reset option if --with-src argument was given + $localtlpdb->option("install_srcfiles", $orig_do_src) if $opts{'with-src'}; + $localtlpdb->option("install_docfiles", $orig_do_doc) if $opts{'with-doc'}; + $localtlpdb->save if ($opts{'with-src'} || $opts{'with-doc'}); } } @@ -6439,20 +6455,22 @@ all packages on which the given Is are dependent, also. Options: =over 4 +=item B<--dry-run> + +Nothing is actually installed; instead, the actions to be performed are +written to the terminal. + =item B<--file> Instead of fetching a package from the installation repository, use the package files given on the command line. These files must be standard TeX Live package files (with contained tlpobj file). -=item B<--reinstall> - -Reinstall a package (including dependencies for collections) even if it -already seems to be installed (i.e, is present in the TLPDB). This is -useful to recover from accidental removal of files in the hierarchy. +=item B<--force> -When re-installing, only dependencies on normal packages are followed -(i.e., not those of category Scheme or Collection). +If updates to C itself (or other parts of the basic +infrastructure) are present, C will bail out and not perform the +installation unless this option is given. Not recommended. =item B<--no-depends> @@ -6468,16 +6486,27 @@ an C system. This option suppresses this behavior, and also implies C<--no-depends>. Don't use it unless you are sure of what you are doing. -=item B<--dry-run> +=item B<--reinstall> -Nothing is actually installed; instead, the actions to be performed are -written to the terminal. +Reinstall a package (including dependencies for collections) even if it +already seems to be installed (i.e, is present in the TLPDB). This is +useful to recover from accidental removal of files in the hierarchy. -=item B<--force> +When re-installing, only dependencies on normal packages are followed +(i.e., not those of category Scheme or Collection). -If updates to C itself (or other parts of the basic -infrastructure) are present, C will bail out and not perform the -installation unless this option is given. Not recommended. +=item B<--with-doc> + +=item B<--with-src> + +While not recommended, the C program provides an option to +omit installation of all documentation and/or source files. (By +default, everything is installed.) After such an installation, you may +find that you want the documentation or source files for a given package +after all. You can get them by using these options in conjunction with +C<--reinstall>, as in (using the C package as the example): + + tlmgr install --reinstall --with-doc --with-src fontspec =back -- cgit v1.2.3