summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-10-09 21:28:37 +0000
committerNorbert Preining <preining@logic.at>2008-10-09 21:28:37 +0000
commit23a625bd639fd9222dce58770fc2e22e874ec590 (patch)
tree9668ec3b1470a253fe3e38fc267506418a769fd2
parent258b5e811409ba7a78f9149cc26ec2b68c3983c3 (diff)
make tlmgr _include_tlpobj accept more .tlpobj on the cmdline
git-svn-id: svn://tug.org/texlive/trunk@10900 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl64
1 files changed, 33 insertions, 31 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 7c16bd7c9a1..7dea481148b 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -150,41 +150,43 @@ my %ret;
if ($action =~ m/^_include_tlpobj$/) {
# this is an internal function that should not be used outside
init_local_db();
- my $tlpobj = TeXLive::TLPOBJ->new;
- $tlpobj->from_file($ARGV[0]);
- # we now have to check whether that is a .doc or .src package, so shipping
- # src or doc files from a different package.
- # We *really* should have that package already installed ...
- my $pkg = $tlpobj->name;
- if ($pkg =~ m/^(.*)\.(src|doc)$/) {
- # got a .src or .doc package
- my $type = $2;
- my $mothership = $1;
- my $mothertlp = $localtlpdb->get_package($mothership);
- if (!defined($mothertlp)) {
- tlwarn("We are trying to add ${type}files to a not existing package $mothership!\n");
- tlwarn("Trying to continue!\n");
- # the best we can do is rename that package to $mothername and add it!
- $tlpobj->name($mothership);
- # add the src/docfiles tlpobj under the mothership name
- $localtlpdb->add_tlpobj($tlpobj);
- } else {
- if ($type eq "src") {
- $mothertlp->srcfiles($tlpobj->srcfiles);
- $mothertlp->srcsize($tlpobj->srcsize);
+ for my $f (@ARGV) {
+ my $tlpobj = TeXLive::TLPOBJ->new;
+ $tlpobj->from_file($f);
+ # we now have to check whether that is a .doc or .src package, so shipping
+ # src or doc files from a different package.
+ # We *really* should have that package already installed ...
+ my $pkg = $tlpobj->name;
+ if ($pkg =~ m/^(.*)\.(src|doc)$/) {
+ # got a .src or .doc package
+ my $type = $2;
+ my $mothership = $1;
+ my $mothertlp = $localtlpdb->get_package($mothership);
+ if (!defined($mothertlp)) {
+ tlwarn("We are trying to add ${type}files to a not existing package $mothership!\n");
+ tlwarn("Trying to continue!\n");
+ # the best we can do is rename that package to $mothername and add it!
+ $tlpobj->name($mothership);
+ # add the src/docfiles tlpobj under the mothership name
+ $localtlpdb->add_tlpobj($tlpobj);
} else {
- # must be "doc"
- $mothertlp->docfiles($tlpobj->docfiles);
- $mothertlp->docsize($tlpobj->docsize);
+ if ($type eq "src") {
+ $mothertlp->srcfiles($tlpobj->srcfiles);
+ $mothertlp->srcsize($tlpobj->srcsize);
+ } else {
+ # must be "doc"
+ $mothertlp->docfiles($tlpobj->docfiles);
+ $mothertlp->docsize($tlpobj->docsize);
+ }
+ # that make sure that the original entry is overwritten
+ $localtlpdb->add_tlpobj($mothertlp);
}
- # that make sure that the original entry is overwritten
- $localtlpdb->add_tlpobj($mothertlp);
+ } else {
+ # completely normal package, just add it
+ $localtlpdb->add_tlpobj($tlpobj);
}
- } else {
- # completely normal package, just add it
- $localtlpdb->add_tlpobj($tlpobj);
+ $localtlpdb->save;
}
- $localtlpdb->save;
exit(0);
} elsif ($action =~ m/^generate$/i) {
merge_into(\%ret, action_generate());