diff options
author | Norbert Preining <preining@logic.at> | 2008-04-17 09:15:59 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-17 09:15:59 +0000 |
commit | cb14dce28c9ff35203aaf34c371d09b1604bdd4d (patch) | |
tree | 57b6b7eee7d8160d6278069c70577b70ad5b914a /Master/texmf | |
parent | 879ffd96ec3bdc67834400d7537e8e75754077e7 (diff) |
add add_archs, available_archs
git-svn-id: svn://tug.org/texlive/trunk@7468 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tl-package-manager.pl | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texlive/tl-package-manager.pl b/Master/texmf/scripts/texlive/tl-package-manager.pl index 44467737210..3af8da8cabf 100755 --- a/Master/texmf/scripts/texlive/tl-package-manager.pl +++ b/Master/texmf/scripts/texlive/tl-package-manager.pl @@ -135,6 +135,55 @@ if ($action =~ m/^generate$/i) { } # should we do some postinst actions? exit(0); +} elsif ($action =~ m/^available_archs$/i) { + # list the available architectures + # initialize the TLMedia from $location + $tlmediasrc = TeXLive::TLMedia->new($location); + my $mediatlpdb = $tlmediasrc->tlpdb; + print "Available architectures:\n"; + foreach my $a ($mediatlpdb->available_architectures) { + print "\t$a\n"; + } + print "You can add new architectures with tlmgr add_archs arch1 arch2\n"; + exit(0); +} elsif ($action =~ m/^add_archs$/i) { + $tlmediasrc = TeXLive::TLMedia->new($location); + my $mediatlpdb = $tlmediasrc->tlpdb; + my @already_installed_arch = $localtlpdb->available_architectures; + my @available_arch = $mediatlpdb->available_architectures; + my @todoarchs; + foreach my $a (@ARGV) { + if (TeXLive::TLUtils::member($a, @already_installed_arch)) { + print "Arch $a is already installed\n"; + next; + } + if (!TeXLive::TLUtils::member($a, @available_arch)) { + print "Arch $a not available, use 'tlmgr available_archs'!\n"; + next; + } + push @todoarchs, $a; + } + foreach my $pkg ($localtlpdb->list_packages) { + next if ($pkg =~ m/^00texlive/); + my $tlp = $localtlpdb->get_package($pkg); + foreach my $dep ($tlp->depends) { + if ($dep =~ m/^(.*)\.ARCH$/) { + # we have to install something + foreach my $a (@todoarchs) { + if ($opt_dry) { + print "Installing $pkg.$a\n"; + } else { + $ret |= $tlmediasrc->install_package("$pkg.$a", $localtlpdb, $opt_nodepends); + } + } + } + } + } + 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); + } } elsif ($action =~ m/^default$/i) { my $what = shift; die("default needs at least one argument") unless defined($what); @@ -146,7 +195,7 @@ if ($action =~ m/^generate$/i) { $localtlpdb->option_location($loc); $localtlpdb->save; } else { - warn "Setting other options currently not support, please edit texlive.tlpdb!"; + warn "Setting other options currently not supported, please edit texlive.tlpdb!"; } exit(0); } elsif ($action =~ m/^list$/i) { @@ -520,6 +569,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>> + +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). + +=item B<available_archs> + +Prints the list of arch-os available at the default install location. + +=item B<add_archs [arch [arch [...]]]> + +Adds binaries for the given architectures to the installtion. + =item B<search> Search the names and short descriptions of all locally installed packages |