summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-02 10:29:01 +0000
committerNorbert Preining <preining@logic.at>2008-05-02 10:29:01 +0000
commit98bdd450c0f0d139f7304c0f67c1b9163610d2c5 (patch)
tree7d2e6f0cdcfa5f4edbb9576e79db1a0df8d1aa88 /Master/texmf
parent610cc78b64b7124448d3a7140e5a7fd0911563cb (diff)
support tlmgr default show, tlmgr default docfiles 1 etc
git-svn-id: svn://tug.org/texlive/trunk@7803 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tl-package-manager.pl77
1 files changed, 64 insertions, 13 deletions
diff --git a/Master/texmf/scripts/texlive/tl-package-manager.pl b/Master/texmf/scripts/texlive/tl-package-manager.pl
index f140b78f02e..0978a69a8a7 100755
--- a/Master/texmf/scripts/texlive/tl-package-manager.pl
+++ b/Master/texmf/scripts/texlive/tl-package-manager.pl
@@ -205,7 +205,7 @@ if ($action =~ m/^generate$/i) {
if ($opt_dry) {
print "Installing $pkg.$a\n";
} else {
- $ret |= $tlmediasrc->install_package("$pkg.$a", $localtlpdb, $opt_nodepends);
+ $ret |= $tlmediasrc->install_package("$pkg.$a", $localtlpdb, $opt_nodepends, 1);
}
}
}
@@ -213,8 +213,8 @@ if ($action =~ m/^generate$/i) {
}
if (TeXLive::TLUtils::member('win32', @todoarchs)) {
# install the necessary win32 stuff
- $ret |= $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb, $opt_nodepends);
- $ret |= $tlmediasrc->install_package("bin-tlgs.win32", $localtlpdb, $opt_nodepends);
+ $ret |= $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb, $opt_nodepends, 1);
+ $ret |= $tlmediasrc->install_package("bin-tlgs.win32", $localtlpdb, $opt_nodepends, 1);
}
} else {
die "Unknown option for arch: $what";
@@ -225,10 +225,48 @@ if ($action =~ m/^generate$/i) {
if ($what =~ m/^location$/i) {
# changes the default location
my $loc = shift;
- die("defaultlocation needs an argument") unless defined($loc);
- print "Setting default location to $loc!\n";
- $localtlpdb->option_location($loc);
- $localtlpdb->save;
+ if ($loc) {
+ print "Setting default location to $loc!\n";
+ $localtlpdb->option_location($loc);
+ $localtlpdb->save;
+ } else {
+ print "Default installation source: ", $localtlpdb->option_location, "\n";
+ }
+ } elsif ($what =~ m/^docfiles$/i) {
+ # changes the default docfiles
+ my $loc = shift;
+ if (defined($loc)) {
+ print "Defaulting to", ($loc ? "" : " not"), " install documentation files!\n";
+ $localtlpdb->option_docfiles($loc);
+ $localtlpdb->save;
+ } else {
+ print "Install documentation files: ", $localtlpdb->option_docfiles, "\n";
+ }
+ } elsif ($what =~ m/^srcfiles$/i) {
+ # changes the default srcfiles
+ my $loc = shift;
+ if (defined($loc)) {
+ print "Defaulting to", ($loc ? "" : " not"), " install source files!\n";
+ $localtlpdb->option_srcfiles($loc);
+ $localtlpdb->save;
+ } else {
+ print "Install source files: ", $localtlpdb->option_srcfiles, "\n";
+ }
+ } elsif ($what =~ m/^formats$/i) {
+ # changes the default formats
+ my $loc = shift;
+ if (defined($loc)) {
+ print "Defaulting to", ($loc ? "" : " not"), " generate format files on installation!\n";
+ $localtlpdb->option_formats($loc);
+ $localtlpdb->save;
+ } else {
+ print "Create formats on installation: ", $localtlpdb->option_formats, "\n";
+ }
+ } elsif ($what =~ m/^show$/i) {
+ print "Default installation location: ", $localtlpdb->option_location, "\n";
+ print "Create formats on installation: ", ($localtlpdb->option_formats ? "yes": "no"), "\n";
+ print "Install documentation files: ", ($localtlpdb->option_docfiles ? "yes": "no"), "\n";
+ print "Install source files: ", ($localtlpdb->option_srcfiles ? "yes": "no"), "\n";
} else {
warn "Setting other options currently not supported, please edit texlive.tlpdb!";
}
@@ -262,7 +300,8 @@ if ($action =~ m/^generate$/i) {
if ($opt_dry) {
print "Installing $pkg\n";
} else {
- $ret |= $tlmediasrc->install_package($pkg, $localtlpdb, $opt_nodepends);
+ # install the packages and run postinstall actions (that is the 1)
+ $ret |= $tlmediasrc->install_package($pkg, $localtlpdb, $opt_nodepends, 1);
}
}
} elsif ($action =~ m/^update$/i) {
@@ -287,7 +326,7 @@ if ($action =~ m/^generate$/i) {
# this way we get rid of useless files
# force the deinstallation since we will reinstall it
$ret |= &remove_package($pkg, $localtlpdb, 1);
- $ret |= $tlmediasrc->install_package($pkg, $localtlpdb, $opt_nodepends);
+ $ret |= $tlmediasrc->install_package($pkg, $localtlpdb, $opt_nodepends, 1);
}
} elsif ($rev > $mediarev) {
print "revision in $location is less then local revision, not updating!\n";
@@ -589,7 +628,10 @@ sub removed_dirs
# files/dirs in that directory.
for my $f (@files) {
my $abs_f = abs_path ($f);
- die ("oops, no abs_path($f) from " . `pwd`) unless $abs_f;
+ if (!$abs_f) {
+ warn ("oops, no abs_path($f) from " . `pwd`);
+ next;
+ }
(my $d = $abs_f) =~ s,/[^/]*$,,;
my @a = exists $by_dir{$d} ? @{$by_dir{$d}} : ();
push (@a, $abs_f);
@@ -669,10 +711,19 @@ remove all dependencies, too, unless with option B<-no-depends>.
Removing a package which is referenced as a dependency in another
collection or scheme will not succeed unless the B<-force> option is given.
-=item B<default C<key> C<value>>
+=item B<default show>
+
+=item B<default C<key> [C<value>]>
+
+The first form shows the default settings as saved in the TeX Live Database.
+
+In the second form if the C<value> is missing the setting is showed, while
+with C<value> present the setting is set to C<value>.
-This command allows to set the defaults as saved in the local texlive.tlpdb.
-Possible values for C<key> are: C<location>. (Will be extended).
+Possible values for C<key> are: C<location> (default installation source),
+C<formats> (create formats at installation time),
+C<docfiles> (install documentation files),
+C<srcfiles> (install source files).
=item B<paper a4>