summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/tlpkg/bin/ctan2tds101
1 files changed, 41 insertions, 60 deletions
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds
index 5f7010d7cb8..5e6fa516cf8 100755
--- a/Master/tlpkg/bin/ctan2tds
+++ b/Master/tlpkg/bin/ctan2tds
@@ -733,21 +733,6 @@ $standardins='\.ins';
);
$standardinsrunner="latex -interaction=nonstopmode";
-%specialins_postdelete = (
- 'comprehensive', 'symbols-letter.pdf', # a4 is enough
- 'dateiliste', 'dateiliste.README*', # already in dist
- 'ednotes', 'perpage.sty', # copy from bigfoot
- 'gfsartemisia', 'A*Specimen.pdf', # nonfree
- 'gfsbodoni', 'B*Specimen.pdf', # nonfree
- 'gfscomplutum', 'C*Specimen.pdf', # nonfree
- 'gfsdidot', '[DO]*Specimen.pdf', # nonfree
- 'gfsneohellenic', 'N*Specimen.pdf', # nonfree
- 'jknapltx', 'ubbold.fd', # clashes with Ubbold.fd from bbold,
- # plus sauter bbold doesn't work?
- 'mathexam', 'sample.tex~',
- 'mh', '*.drv *.ins', # derived from dtx's
-);
-
%specialmakeindex= (
);
$standardmakeindex='\.ist';
@@ -1192,18 +1177,28 @@ $standardxmt='\.xmt';
# which suffixes to remove after building
$cleanpatt='\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot|\.bbl|\.blg|\.idx|\.ind|\.ilg|\.glo|\.gls|\.loa';
%moreclean = (
+ 'AkkTeX' => 'still to do',
'bbcard' => 'bbcard.tpm',
'chessboard' => 'chessboard.pdf',
'chessfss' => 'chessfonts_gallery.pdf|chessfss.pdf',
+ 'comprehensive'=> 'symbols-letter.pdf', # a4 is enough
+ 'dateiliste' => 'dateiliste.README*', # already in dist
+ 'ednotes' => 'perpage.sty', # copy from bigfoot
'epslatex-fr' => 'R?Danger.eps',
'flacards' => 'flacards.pdf',
- 'minitoc' => 'minitoc-texmf.zip', # should just use it, actually
- 'AkkTeX' => 'still to do',
+ 'gfsartemisia' => 'A*Specimen.pdf', # nonfree
+ 'gfsbodoni' => 'B*Specimen.pdf', # nonfree
+ 'gfscomplutum' => 'C*Specimen.pdf', # nonfree
+ 'gfsdidot' => '[DO]*Specimen.pdf', # nonfree
+ 'gfsneohellenic'=>'N*Specimen.pdf', # nonfree
+ 'guitbeamer' => 'guitbeamer-de.pdf',
+ 'jknapltx' => 'ubbold.fd', # clashes bbold's Ubbold.fd; sauter bbold fails
+ 'mathexam' => 'sample.tex~',
+ 'mh' => '*.drv *.ins', # derived from dtx's
'piechartmp' => 'piechartmp.pdf',
- 'susy' => 'susy.pdf',
'stubs' => 'stubs.pdf',
- 'guitbeamer' => 'guitbeamer-de.pdf',
- 'xskak' => 'xskak.pdf',
+ 'susy' => 'susy.pdf', # no source
+ 'xskak' => 'xskak.pdf', # no source
);
# Read from config file to make local adjustments to above.
@@ -1449,10 +1444,10 @@ sub donormal {
#
# this is a bit weird, but its an easy way to remove
# empty directories that we never used.
- &SYSTEM("rmdir $DEST/*/$whichformat/$package 2> /dev/null");
+ &SYSTEM ("rmdir $DEST/*/$whichformat/$package 2>/dev/null");
- killfiles($cleanpatt);
- killmorefiles($moreclean{$package}) if $moreclean{$package};
+ killfiles ($cleanpatt);
+ killfiles ($moreclean{$package}, "more") if $moreclean{$package};
my $postaction = $specialpostaction{$package};
eval ($postaction) if $postaction;
@@ -1466,8 +1461,7 @@ sub runins {
&runjob ("yes | sed 5q | $insrunner $_");
}
- my $postdelete = $specialins_postdelete{$package};
- &SYSTEM ("$RM $postdelete") if $postdelete;
+ &killfiles ($moreclean{$package}, "more") if $moreclean{$package};
}
sub install {
@@ -1651,59 +1645,47 @@ sub runjob {
# remove additional files matching something in $moreclean
# create a README.TEXLIVE which lists the removed files
#
-sub killmorefiles {
- my ($killpatt) = @_;
- my $fh;
- my @delfiles;
+# remove all files matching something in $killpatt.
+# also remove .ps files for which we have a .pdf.
+#
+sub killfiles
+{
+ my ($killpatt,$more) = @_;
+
+ my @delfiles = ();
for (grep (/$killpatt/, @filenames)) {
print "\t Remove $_\n";
- unlink $_;
- push @delfiles, $_;
+ if (unlink ($_)) {
+ push (@delfiles, $_);
+ } else {
+ warn "unlink($_) failed: $!";
+ }
}
for (grep (/\.ps$/, @filenames)) {
(my $pdf = $_) =~ s/ps$/pdf/;
next unless grep (/$pdf/, @filenames);
print "\t Remove ps $_ (since have $pdf)\n";
- unlink $_;
- push @delfiles, $_;
+ unlink ($_) && push (@delfiles, $_);
}
- # create/add some lines to README.TEXLIVE
- if (@delfiles) {
- open RTL, ">>README.TEXLIVE" or warn "Cannot create README.TEXLIVE\n";
+
+ if ($more && @delfiles) {
+ # create/update README.TEXLIVE.
+ open RTL, ">README.TEXLIVE" or warn "open(>README.TEXLIVE) failed: $!";
print RTL <<EOF;
+The following files have been removed in the TeX Live installation of
+the current package, typically due to duplication, lack of space, or
+missing source code. You can find these files on CTAN. If questions or
+concerns, email tex-live@tug.org.
-The following files have been removed from the current package
-due to licensing conditions or missing source code. Please find
-these files on the CTAN!
EOF
foreach my $f (@delfiles) {
print RTL "\t$f\n";
}
- print RTL "\n";
close RTL;
}
}
-# remove all files matching something in $killpatt.
-# also remove .ps files for which we have a .pdf.
-#
-sub killfiles {
- my ($killpatt) = @_;
- for (grep (/$killpatt/, @filenames)) {
- print "\t Remove $_\n";
- unlink $_;
- }
-
- for (grep (/\.ps$/, @filenames)) {
- (my $pdf = $_) =~ s/ps$/pdf/;
- next unless grep (/$pdf/, @filenames);
- print "\t Remove ps $_ (since have $pdf)\n";
- unlink $_;
- }
-
-}
-
# rebuild list of input files, e.g., after flattening
sub buildfilelist {
print "doing buildfilelist()...\n";
@@ -3053,7 +3035,6 @@ sub MAKEpst {
&dotex;
&dotype1;
killfiles($cleanpatt);
- killmorefiles($moreclean{$package}) if $moreclean{$package};
&SYSTEM("mkdir -p $DEST/tex/latex/$package");
&SYSTEM("mv $DEST/tex/generic/$package/*sty $DEST/tex/latex/$package");
&SYSTEM("mv $DEST/doc/generic/$package/*sty $DEST/tex/latex/$package");