summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-04-28 22:20:48 +0000
committerNorbert Preining <preining@logic.at>2009-04-28 22:20:48 +0000
commit650a2e371424b0df21e41e8fbea5176f5a0f3ef9 (patch)
treec714f7270e4a3f998516042576f496278c3db401 /Master/tlpkg/etc
parent4a04278ac62c20ad50487a25b98c30d52c4fc746 (diff)
updates to tlrepo-from-minimals
git-svn-id: svn://tug.org/texlive/trunk@12845 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/etc')
-rw-r--r--Master/tlpkg/etc/tlrepo-from-minimals.pl111
1 files changed, 71 insertions, 40 deletions
diff --git a/Master/tlpkg/etc/tlrepo-from-minimals.pl b/Master/tlpkg/etc/tlrepo-from-minimals.pl
index a6eb5eca56d..7dfec4dc34b 100644
--- a/Master/tlpkg/etc/tlrepo-from-minimals.pl
+++ b/Master/tlpkg/etc/tlrepo-from-minimals.pl
@@ -31,16 +31,20 @@ my %min_to_tl_arch = qw/freebsd i386-freebsd
solaris-intel i386-solaris
solaris-sparc sparc-solaris/;
+my @scripts_to_link = qw/luatools mtxrun/;
+
my $help = 0;
my $dist = "current";
my $dest = "web";
my $opt_luatex = 0;
my $opt_modules = 0;
-my $opt_context = 0;
+my $opt_context = 1;
my $opt_all = 0;
my $opt_dontclean = 0;
my $source = ".";
my $opt_recreate = 0;
+my $opt_nocontainers = 0;
+my $upstreamsource = "$source/texlive";
TeXLive::TLUtils::process_logging_options();
GetOptions(
@@ -53,6 +57,8 @@ GetOptions(
"all" => \$opt_all,
"dont-clean" => \$opt_dontclean,
"recreate" => \$opt_recreate,
+ "nocontainers" => \$opt_nocontainers,
+ "upstream-source" => \$upstreamsource,
"help|?" => \$help) or pod2usage(1);
pod2usage(-exitstatus => 0, -verbose => 2) if $help;
@@ -72,24 +78,33 @@ info("Using tmp dir $tmp\n");
if ($opt_context) {
info("Copying files for ConTeXt ... ");
system("mkdir -p $tmp/texmf-dist");
- system("cp -a $source/$dist/context/current/* $tmp/texmf-dist");
+ system("cp -a $source/current/context/$dist/* $tmp/texmf-dist");
system("mkdir -p $tmp/tlpkg/tlpsrc");
- system("cp $source/tlpkg/tlpsrc/context.tlpsrc $tmp/tlpkg/tlpsrc");
- system("cp $source/tlpkg/tlpsrc/bin-context.tlpsrc $tmp/tlpkg/tlpsrc");
+ get_from_ups("tlpkg/tlpsrc/context.tlpsrc", "$tmp/tlpkg/tlpsrc");
+ get_from_ups("tlpkg/tlpsrc/bin-context.tlpsrc", "$tmp/tlpkg/tlpsrc");
for my $i (keys %min_to_tl_arch) {
system("mkdir -p $tmp/bin/$min_to_tl_arch{$i}");
- system("cp -a $source/$dist/bin/context/$i/bin/* $tmp/bin/$min_to_tl_arch{$i}");
- if ($i eq "mswin") {
- system("cp -a $tmp/bin/$min_to_tl_arch{$i}/mpost.exe $tmp/bin/$min_to_tl_arch{$i}/metafun.exe");
- } else {
- system("ln -s mpost $tmp/bin/$min_to_tl_arch{$i}/metafun");
+ system("cp -a $source/current/bin/context/$i/bin/* $tmp/bin/$min_to_tl_arch{$i}");
+ # we have to fix the scripts to be links on unix systems
+ if ($i ne "mswin") {
+ for my $s (@scripts_to_link) {
+ system("ln -sf ../../texmf-dist/scripts/context/lua/$s.lua $tmp/bin/$min_to_tl_arch{$i}/$s");
+ system("chmod 0755 $tmp/bin/$min_to_tl_arch{$i}/$s");
+ }
}
+ # metafun is not needed anymore, according to Mojca on the train
+ # to BachoTeX 2009
+ #if ($i eq "mswin") {
+ # system("cp -a $tmp/bin/$min_to_tl_arch{$i}/mpost.exe $tmp/bin/$min_to_tl_arch{$i}/metafun.exe");
+ #} else {
+ # system("ln -s mpost $tmp/bin/$min_to_tl_arch{$i}/metafun");
+ #}
# that is needed otherwise the dangling symlink is ignored
- system("touch $tmp/bin/$min_to_tl_arch{$i}/mpost");
+ #system("touch $tmp/bin/$min_to_tl_arch{$i}/mpost");
}
- get_from_tug("texmf-dist/tex/mptopdf/config/mptopdf.ini",
+ get_from_ups("texmf-dist/tex/mptopdf/config/mptopdf.ini",
"$tmp/texmf-dist/tex/mptopdf/config/mptopdf.ini");
- get_from_tug("texmf/fmtutil/format.context.cnf",
+ get_from_ups("texmf/fmtutil/format.context.cnf",
"$tmp/texmf/fmtutil/format.context.cnf");
#
# we want to create the .ini files for the used languages. We could
@@ -98,10 +113,10 @@ if ($opt_context) {
#
# Copying would be:
#for my $l (qw/cz de en fr it nl ro uk/) {
- # get_from_tug("texmf-dist/tex/context/config/cont-$l.ini"
+ # get_from_ups("texmf-dist/tex/context/config/cont-$l.ini"
# "$tmp/texmf-dist/tex/context/config/cont-$l.ini");
#}
- for my $l (glob "$source/$dist/context/current/tex/context/base/cont-??.tex") {
+ for my $l (glob "$source/current/context/$dist/tex/context/base/cont-??.tex") {
my $bn = TeXLive::TLUtils::basename($l);
my $ll = $bn;
$ll =~ s/cont-(..)\.tex/$1/;
@@ -112,9 +127,9 @@ if ($opt_context) {
if ($opt_modules) {
info("Copying files for ConTeXt modules ... ");
- system("cp -a $source/$dist/modules/all/* $tmp/texmf-dist");
+ system("cp -a $source/current/modules/*/* $tmp/texmf-dist");
system("mkdir -p $tmp/tlpkg/tlpsrc");
- system("cp $source/tlpkg/tlpsrc/context-*.tlpsrc $tmp/tlpkg/tlpsrc");
+ system("cp $source/texlive/tlpkg/tlpsrc/context-*.tlpsrc $tmp/tlpkg/tlpsrc");
# we didn't copy the context-letter and context-taspresent because
# they are not present in the context minimals
info("done\n");
@@ -124,7 +139,7 @@ if ($opt_luatex) {
info("Copying files for luatex ... ");
for my $i (keys %min_to_tl_arch) {
system("mkdir -p $tmp/bin/$min_to_tl_arch{$i}");
- system("cp -a $source/$dist/bin/luatex/$i/bin/* $tmp/bin/$min_to_tl_arch{$i}");
+ system("cp -a $source/current/bin/luatex/$i/bin/* $tmp/bin/$min_to_tl_arch{$i}");
if ($i eq "mswin") {
system("cp -a $tmp/bin/$min_to_tl_arch{$i}/luatex.exe $tmp/bin/$min_to_tl_arch{$i}/pdfluatex.exe");
} else {
@@ -132,8 +147,8 @@ if ($opt_luatex) {
}
}
system("mkdir -p $tmp/tlpkg/tlpsrc");
- system("cp $source/tlpkg/tlpsrc/luatex.tlpsrc $tmp/tlpkg/tlpsrc");
- get_from_tug("texmf/fmtutil/format.luatex.cnf",
+ get_from_ups("tlpkg/tlpsrc/luatex.tlpsrc", "$tmp/tlpkg/tlpsrc");
+ get_from_ups("texmf/fmtutil/format.luatex.cnf",
"$tmp/texmf/fmtutil/format.luatex.cnf");
info("done\n");
}
@@ -141,11 +156,11 @@ if ($opt_luatex) {
# copy the tlpkg stuff
info("Copying files for infrastructure ... ");
-get_from_tug("tlpkg/TeXLive", "$tmp/tlpkg/TeXLive");
-get_from_tug("tlpkg/bin", "$tmp/tlpkg/bin");
-system("cp $source/tlpkg/tlpsrc/00texlive.config.tlpsrc $tmp/tlpkg/tlpsrc");
+get_from_ups("tlpkg/TeXLive", "$tmp/tlpkg/TeXLive");
+get_from_ups("tlpkg/bin", "$tmp/tlpkg/bin");
+get_from_ups("tlpkg/tlpsrc/00texlive.config.tlpsrc", "$tmp/tlpkg/tlpsrc");
# should we get that from TUG, too?
-get_from_tug("tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc",
+get_from_ups("tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc",
"$tmp/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc");
info("done\n");
@@ -155,7 +170,7 @@ system("perl $tmp/tlpkg/bin/tlpsrc2tlpdb -from-files -with-win-pattern-warning -
info("done\n");
# get the current texlive.tlpdb from the tug server
-get_from_tug("tlpkg/texlive.tlpdb", "$tmp/texlive-dist.tlpdb");
+get_from_ups("tlpkg/texlive.tlpdb", "$tmp/texlive-dist.tlpdb");
my $tltlpdb = TeXLive::TLPDB->new;
$tltlpdb->from_file("$tmp/texlive-dist.tlpdb");
die("Cannot read original tlpdb from $tmp/texlive-dist.tlpdb") unless defined($tltlpdb);
@@ -163,14 +178,27 @@ die("Cannot read original tlpdb from $tmp/texlive-dist.tlpdb") unless defined($t
my $mitlpdb = TeXLive::TLPDB->new(root => "$tmp");
die("Cannot read minimals tlpdb from $tmp/tlpkg/texlive.tlpdb") unless defined($mitlpdb);
+my $webtlpdb;
+if (!$opt_recreate) {
+ $webtlpdb = TeXLive::TLPDB->new(root => "$dest");
+}
+$webtlpdb = $mitlpdb unless defined($webtlpdb);
+
for my $p ($mitlpdb->list_packages) {
next if ($p =~ m/^00texlive/);
my $mitlp = $mitlpdb->get_package($p);
die "Cannot get $p from minimals tlpdb" unless defined($mitlp);
my $tltlp = $tltlpdb->get_package($p);
die "Cannot get $p from original tlpdb" unless defined($tltlp);
+ my $webtlp = $webtlpdb->get_package($p);
+ die "Cannot get $p from web tlpdb" unless defined($webtlp);
# fix the revision by adding 1 to the revision as currently shipped by TL
- $mitlp->revision($tltlp->revision + 1);
+ # or my increasing the version from the minimals tlpdb
+ if ($webtlp->revision > $tltlp->revision) {
+ $mitlp->revision($webtlp->revision + 1);
+ } else {
+ $mitlp->revision($tltlp->revision + 1);
+ }
# the following is actually replacing the original tlpobj
$mitlpdb->add_tlpobj($mitlp);
@@ -217,17 +245,18 @@ for my $p ($mitlpdb->list_packages) {
$mitlpdb->save;
-# create the containers
-info("Creating containers ... ");
-my $cmd = "perl $tmp/tlpkg/bin/tl-update-containers -location $dest -no-setup";
-$cmd .= " -recreate" if $opt_recreate;
-system($cmd);
-info("done\ņ");
-
-if (!$opt_dontclean) {
- info("Cleaning tmp directory (probably dangerous!!!) ... ");
- system("rm -rf \"$tmp\"");
- info ("done\n");
+if (!$opt_nocontainers) {
+ # create the containers
+ info("Creating containers ... ");
+ my $cmd = "perl $tmp/tlpkg/bin/tl-update-containers -location $dest -no-setup";
+ $cmd .= " -recreate" if $opt_recreate;
+ system($cmd);
+ info("done\ņ");
+ if (!$opt_dontclean) {
+ info("Cleaning tmp directory (probably dangerous!!!) ... ");
+ system("rm -rf \"$tmp\"");
+ info ("done\n");
+ }
}
info("Finished!\n");
@@ -263,13 +292,15 @@ sub compare_lists {
return(@diff);
}
-sub get_from_tug {
+sub get_from_ups {
my ($what, $dest) = @_;
my $dn = TeXLive::TLUtils::dirname($dest);
system("mkdir -p $dn");
- #system("rsync .... Master/$what $dest");
- info("WARNING: we are not actually fetching $what from tug, but copying!\n");
- system("cp -a /src/TeX/texlive-svn/Master/$what $dest");
+ if (-r "tl-override/$what") {
+ system("cp -a tl-override/$what $dest");
+ } else {
+ system("cp -a $source/texlive/$what $dest");
+ }
}
### Local Variables: