texlive[46428] Master/tlpkg/bin: save backup of tlpdb when building

commits+karl at tug.org commits+karl at tug.org
Wed Jan 24 19:11:41 CET 2018


Revision: 46428
          http://tug.org/svn/texlive?view=revision&revision=46428
Author:   karl
Date:     2018-01-24 19:11:41 +0100 (Wed, 24 Jan 2018)
Log Message:
-----------
save backup of tlpdb when building or pruning release image

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tl-prune-platforms
    trunk/Master/tlpkg/bin/tl-update-images

Modified: trunk/Master/tlpkg/bin/tl-prune-platforms
===================================================================
--- trunk/Master/tlpkg/bin/tl-prune-platforms	2018-01-24 08:37:43 UTC (rev 46427)
+++ trunk/Master/tlpkg/bin/tl-prune-platforms	2018-01-24 18:11:41 UTC (rev 46428)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# Copyright 2012-2016 Norbert Preining
+# Copyright 2012-2018 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 #
@@ -41,8 +41,7 @@
 exit (&main());
 
 

-sub main
-{
+sub main {
   # prune db in the same hierarchy from which we are being run.
   chomp(my $Master = `cd $mydir/../.. && pwd`);
   # necessary for TLUtils->platform
@@ -104,8 +103,13 @@
     push @newarchs, $a if !TeXLive::TLUtils::member($a, @ARGV);
   }
 
-  $tlpdb->setting("available_architectures", at newarchs);
-  $tlpdb->save unless $opt_dry;
+  $tlpdb->setting("available_architectures", @newarchs);
+  
+  if (! $opt_dry) {
+    TeXLive::TLUtils::copy ("-f", $tlpdb->location,
+                            $tlpdb->location . ".preprune");
+    $tlpdb->save;
+  }
 
   return 0;
 }
@@ -139,7 +143,7 @@
 L<TeXLive::TLUtils> for details.
 
 The format of the containers and the splitting of source and
-documentation files are controlled by the TLPDB options in the
+documentation files are controlled by the tlpdb options in the
 pseudo-package C<00texlive.config>.  See L<TeXLive::TLPDB>.
 
 =head1 DESCRIPTION
@@ -151,6 +155,9 @@
 It is used during DVD production to exclude certain platforms, and is
 run from the L<tl-update-images> script.
 
+The pre-existing tlpdb file is saved with extension C<.preprune> before
+the modified version is written.
+
 =head1 AUTHORS AND COPYRIGHT
 
 This script and its documentation were written for the TeX Live

Modified: trunk/Master/tlpkg/bin/tl-update-images
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-images	2018-01-24 08:37:43 UTC (rev 46427)
+++ trunk/Master/tlpkg/bin/tl-update-images	2018-01-24 18:11:41 UTC (rev 46428)
@@ -36,6 +36,7 @@
 tar_devsource_only=false
 tar_extra_only=false
 tar_source_only=false
+tlnet=/home/ftp/texlive/tlpretest
 quiet=  # for passing to mkisofs
 
 while test $# -gt 0; do
@@ -52,6 +53,7 @@
   --tar-devsource-only) tar_all=false; makeinst=false;tar_devsource_only=true;;
   --tar-extra-only)     tar_all=false; makeinst=false; tar_extra_only=true;;
   --tar-source-only)    tar_all=false; makeinst=false; tar_source_only=true;;
+  --tlnet=*)   tlnet=`echo $1 | sed 's/.*=//'`;;
   --version)   echo "$0 for $NAME-$V ($D)"; exit 0;;  # who cares ...
   *) echo "$0: unknown option $1; try --help if you need it." >&2; exit 1;;
   esac
@@ -97,7 +99,7 @@
    | (cd $imgdir/texlive-doc && tar xf -))
   
   # files from network dist.
-  cd /home/ftp/texlive/tlpretest || exit 1
+  cd $tlnet || exit 1
   if $debug; then
     echo "source = `pwd`"
   fi
@@ -105,7 +107,12 @@
     echo "$0: no install-tl in `pwd`, goodbye." >&2
     exit 1
   fi
-  cp -pr install-tl *.bat tlpkg archive $imgdir
+  cp -pr install-tl *.bat tlpkg archive $imgdir || exit 1
+  #
+  # Save all tlpdb files before pruning platforms.
+  preprune=/tmp/pruneimg.pre
+  rm -rf $preprune && mkdir $preprune
+  cp -r tlpkg/texlive.tlpdb $preprune || exit 1
   
   # remove platforms to save space on the dvd.
   # do this here so that they can be kept in the tree,
@@ -117,7 +124,7 @@
   echo "-- pruning platforms: $prune..."
   mkdir $imgdir/tlpkg/bin
   cp $mydir/tl-prune-platforms $imgdir/tlpkg/bin
-  $imgdir/tlpkg/bin/tl-prune-platforms $prune >/tmp/imgprune
+  $imgdir/tlpkg/bin/tl-prune-platforms $prune >/tmp/pruneimg.out
 
   # due to the pruning, must re-checksum and re-sign the tlpdb in the image.
   md5sum $imgdir/tlpkg/texlive.tlpdb >$imgdir/tlpkg/texlive.tlpdb.md5 \
@@ -184,7 +191,7 @@
 # Make the tar files: the sources, the texmf trees, the binaries, the
 # minor "extra" files.  Each should unpack into its directory name.  We
 # use the GNU tar --transform option to avoid copying the whole
-# hierarchy to a temp directory.  This auxiliary function takes that
+# hierarchy to a temp directory.  The do_tar function takes that
 # temp directory name as its first argument, and the files to archive as
 # the rest.
 # 
@@ -206,9 +213,6 @@
     excludes="$excludes --exclude=Work --exclude=inst"
     excludes="$excludes --exclude=autom4te.cache"
     excludes="$excludes --exclude=asymptote/binaries" # also distclean asy
-    for e in bibtex epstopdf jfontmaps; do  # exclude "upstream" sources
-      excludes="$excludes --exclude=extra/$e"
-    done
   fi
   #
   tar_common_opt="$verbose $compress $excludes"
@@ -248,7 +252,7 @@
     cd $master || exit 1
     do_tar $NAME-$D-extra \
          LICENSE* README* autorun.inf *.html install* re* tl-* \
-         tlpkg/TeXLive tlpkg/translations tlpkg/tlpostcode
+         tlpkg/TeXLive tlpkg/texlive.tlpdb tlpkg/tlpostcode tlpkg/translations
     $tar_extra_only && return  # for debugging
   fi
   



More information about the tex-live-commits mailing list