summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-09-28 22:50:11 +0000
committerKarl Berry <karl@freefriends.org>2012-09-28 22:50:11 +0000
commitd85661d3d3b7510a86424cadb9c6cb71a0210cc1 (patch)
tree8e80da9b1b8464c532e5976b9c2cf51851fc6e09 /Build/source/texk
parent02339c48110d49c5009d1553b3df1629e77e53cc (diff)
typeoutfileinfo (28sep12)
git-svn-id: svn://tug.org/texlive/trunk@27846 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl105
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh21
2 files changed, 103 insertions, 23 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index b5c20567972..e97648435a4 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 27601 2012-09-05 23:52:48Z preining $
+# $Id: tlmgr.pl 27748 2012-09-20 10:36:14Z preining $
#
# Copyright 2008, 2009, 2010, 2011, 2012 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 27601 $';
-my $datrev = '$Date: 2012-09-06 01:52:48 +0200 (Thu, 06 Sep 2012) $';
+my $svnrev = '$Revision: 27748 $';
+my $datrev = '$Date: 2012-09-20 12:36:14 +0200 (Thu, 20 Sep 2012) $';
my $tlmgrrevision;
my $prg;
if ($svnrev =~ m/: ([0-9]+) /) {
@@ -170,6 +170,7 @@ sub main {
"no-depends-at-all" => 1,
"force" => 1,
"dry-run|n" => 1 },
+ "repository" => { "with-platforms" => 1 },
"restore" => { "backupdir" => "=s",
"dry-run|n" => 1,
"all" => 1,
@@ -538,6 +539,9 @@ sub execute_action {
} elsif ($action =~ m/^repository$/i) {
action_repository();
finish(0);
+ } elsif ($action =~ m/^pinning$/i) {
+ action_pinning();
+ finish(0);
} elsif ($action =~ m/^candidates$/i) {
action_candidates();
finish(0);
@@ -3486,10 +3490,25 @@ sub show_list_of_packages {
return;
}
+# PINNING
+#
+# this action manages the pinning file
+# of course it can be edited by hand, but we want to make this
+# easier for people to use
+# tlmgr pinning show
+# tlmgr pinning check
+# tlmgr pinning add <repo> <pkgglob> [<pkgglob>, ...]
+# tlmgr pinning remove <repo> <pkgglob> [<pkgglob>, ...]
+# tlmgr pinning remove <repo> --all
+sub action_pinning {
+ tlwarn("Not implemented by now, sorry!\n");
+}
+
# REPOSITORY
#
# this action manages the list of repositories
# tlmgr repository list -> lists repositories
+# tlmgr repository list path|tag -> lists content of repo path|tag
# tlmgr repository add path [tag] -> add repository with optional tag
# tlmgr repository remove [path|tag] -> removes repository or tag
# tlmgr repository set path[#tag] [path[#tag] ...] -> sets the list
@@ -3539,20 +3558,73 @@ sub repository_to_array {
}
return %r;
}
+sub merge_sub_packages {
+ my %pkgs;
+ for my $p (@_) {
+ if ($p =~ m/^(.*)\.([^.]*)$/) {
+ my $n = $1;
+ my $a = $2;
+ if ($p eq "texlive.infra") {
+ push @{$pkgs{$p}}, "all";
+ } else {
+ push @{$pkgs{$n}}, $a;
+ }
+ } else {
+ push @{$pkgs{$p}}, "all";
+ }
+ }
+ return %pkgs;
+}
sub action_repository {
init_local_db();
my $what = shift @ARGV;
$what = "list" if !defined($what);
my %repos = repository_to_array($localtlpdb->option("location"));
if ($what =~ m/^list$/i) {
- print "List of repositories (with tags if set):\n";
- for my $k (keys %repos) {
- my $v = $repos{$k};
- print "\t$v";
- if ($k ne $v) {
- print " ($k)";
+ if (@ARGV) {
+ # list what is in a repository
+ for my $repo (@ARGV) {
+ my $loc = $repo;
+ if (defined($repos{$repo})) {
+ $loc = $repos{$repo};
+ }
+ my ($tlpdb, $errormsg) = setup_one_remotetlpdb($loc);
+ if (!defined($tlpdb)) {
+ tlwarn("cannot locate get TLPDB from $loc\n\n");
+ } else {
+ print "Packages at $loc:\n";
+ my %pkgs = merge_sub_packages($tlpdb->list_packages);
+ for my $p (sort keys %pkgs) {
+ next if ($p =~ m/00texlive/);
+ print " $p";
+ if (!$opts{'with-platforms'}) {
+ print "\n";
+ } else {
+ my @a = @{$pkgs{$p}};
+ if ($#a == 0) {
+ if ($a[0] eq "all") {
+ # no further information necessary
+ print "\n";
+ } else {
+ print ".$a[0]\n";
+ }
+ } else {
+ print " (@{$pkgs{$p}})\n";
+ }
+ }
+ }
+ }
+ }
+ } else {
+ print "List of repositories (with tags if set):\n";
+ for my $k (keys %repos) {
+ my $v = $repos{$k};
+ print "\t$v";
+ if ($k ne $v) {
+ print " ($k)";
+ }
+ print "\n";
}
- print "\n";
}
return;
}
@@ -6151,6 +6223,8 @@ written to the terminal.
=item B<repository list>
+=item B<repository list I<path|tag>>
+
=item B<repository add I<path> [I<tag>]>
=item B<repository remove I<path|tag>>
@@ -6161,8 +6235,15 @@ This action manages the list of repositories. See L</"MULTIPLE
REPOSITORIES"> below for detailed explanations.
The first form (C<list>) lists all configured repositories and the
-respective tags if set. The second form (C<add>) adds a repository
-(optionally attaching a tag) to the list of repositories. The third
+respective tags if set. If a path, url, or tag is given after the
+C<list> keyword, it is interpreted as source from where to
+initialize a TeX Live Database and lists the contained packages.
+This can also be an up-to-now not used repository, both locally
+and remote. If one pass in addition C<--with-platforms>, for each
+package the available platforms (if any) are listed, too.
+
+The third form (C<add>) adds a repository
+(optionally attaching a tag) to the list of repositories. The forth
form (C<remove>) removes a repository, either by full path/url, or by
tag. The last form (C<set>) sets the list of repositories to the items
given on the command line, not keeping previous settings
diff --git a/Build/source/texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh b/Build/source/texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh
index 18d618a1849..2780883e82f 100755
--- a/Build/source/texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh
+++ b/Build/source/texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh
@@ -11,13 +11,9 @@
## in order to display [FILENAME].[TXT]'s FILE INFO (\listfile entry)
## using \typeout. This requires that [FILENAME].[EXT] contains a
## \ProvidesFile, \ProvidesPackage, or \ProvidesClass command.
-(
-cat << EOM
-\\RequirePackage{readprov} \\ReadFileInfos{$1}
-\\typeout{^^J^^J *$1 info*: \\space \\csname ver@$1\\endcsname^^J^^J}%
-\\batchmode\\stop ## \batchmode added 2012/09/16
-EOM
-) | latex
+latex \\RequirePackage{readprov}\\ReadFileInfos{$1}\
+\\typeout{^^J^^J + $1 info: + \\csname ver@$1\\endcsname^^J}\
+\\batchmode\\stop
##
## Copyright (C) 2012 Uwe Lueck, http://contact-ednotes.sty.de.vu/
##
@@ -31,11 +27,11 @@ EOM
##
## There is NO WARRANTY.
##
-## This is package version v0.21 as of 2012-09-19.
+## This is package version v0.31 as of 2012-09-28.
##
-## CREDIT: this work derived from Harald Harders' `latexfileversion'
-## as a simplification using my `readprov'. I learnt "here document"
-## from `latexfileversion's -- UL.
+## CREDITS: This work derived from Harald Harders' `latexfileversion'
+## as a simplification using my `readprov'. Reinhard Kotucha
+## improved the code, see HISTORY.
##
## PURPOSE/BACKGROUND: A package like this, `latexfileversion' or
## `ltxfileinfo' when you wonder which version of a source file
@@ -51,3 +47,6 @@ EOM
## v0.1a 2012/03/16
## v0.2 2012/09/16 adds \batchmode thanks to Heiko Oberdiek on texhax
## v0.21 2012/09/19 shebang line corrected/improved by Reinhard Kotucha
+## v0.3 2012/09/27 long line instead of here document,
+## different spacing, * -> + (misinterpreded)
+## v0.31 2012/09/28 code line broken by `\', thanks to Reinhard Kotucha