texlive[44808] Master/tlpkg: more work on tlcontrib ctan2tl

commits+preining at tug.org commits+preining at tug.org
Sat Jul 15 15:01:11 CEST 2017


Revision: 44808
          http://tug.org/svn/texlive?view=revision&revision=44808
Author:   preining
Date:     2017-07-15 15:01:11 +0200 (Sat, 15 Jul 2017)
Log Message:
-----------
more work on tlcontrib ctan2tl

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/ctan2tl
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/libexec/place

Modified: trunk/Master/tlpkg/bin/ctan2tl
===================================================================
--- trunk/Master/tlpkg/bin/ctan2tl	2017-07-15 13:00:54 UTC (rev 44807)
+++ trunk/Master/tlpkg/bin/ctan2tl	2017-07-15 13:01:11 UTC (rev 44808)
@@ -31,7 +31,7 @@
   exit 0
 fi
 
-place_chicken=
+place_chicken=-n
 copy_from_ctan=true
 contrib_ctan2tds_arg=
 contrib_place_arg=
@@ -50,7 +50,7 @@
     '--contrib')
       do_contrib=true
       contrib_ctan2tds_arg=--contrib
-      contrib_place_arg=--contrib
+      contrib_place_arg="--contrib=/home/norbert/Development/TeX/tlcontrib --mode=git"
       shift
       continue
       ;;

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2017-07-15 13:00:54 UTC (rev 44807)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2017-07-15 13:01:11 UTC (rev 44808)
@@ -77,7 +77,7 @@
  'adforn',      "&MAKEcopy",
  'adfsymbols',  "&MAKEcopy",
  'adobe-euro',  "die 'skipping, support for nonfree fonts'",
- 'adobecaslon', "die 'skipping, support for nonfree fonts'",
+ 'adobecaslon', "nonfree_die('skipping, support for nonfree fonts', '&MAKEflatten')",
  'adrlist',     "die 'skipping, noinfo license'",
  'ae',          "&MAKEae",
  'aeb_mlink',   "die 'skipping, per author (dps) request'",
@@ -128,7 +128,7 @@
  'asana-math',  "die 'skipping, use Asana-Math'",
  'ascii',       "die 'skipping, use ascii-font'",
  'ascii-font',  "&MAKEflatten",
- 'astron',      "die 'skipping, nonfree license'",
+ 'astron',      "nonfree_die('skipping, nonfree license', '&MAKEflatten')",
  'atqolive',    "die 'skipping, nonfree font'",
  'augie',       "&MAKEaugie",
  'aurical',     "&MAKEaurical",

Modified: trunk/Master/tlpkg/libexec/place
===================================================================
--- trunk/Master/tlpkg/libexec/place	2017-07-15 13:00:54 UTC (rev 44807)
+++ trunk/Master/tlpkg/libexec/place	2017-07-15 13:01:11 UTC (rev 44808)
@@ -21,22 +21,19 @@
 use TeXLive::TLPOBJ;
 use TeXLive::TLPDB;
 use TeXLive::TLTREE;
+use Getopt::Long;
 
-if ($ARGV[0] eq "-n") {
-  $chicken = 1;
-  shift;
-} else {
-  $chicken = 0;
-}
+my $chicken = 0;
+my $opt_contrib;
+my $opt_mode    = "svn";
+exit 2 unless Getopt::Long::GetOptions (
+  "n" => \$chicken,
+  "contrib=s" => \$opt_contrib,
+  "mode=s"    => \$opt_mode,
+);
+
 print "place: chicken mode = $chicken\n";
 
-my $do_contrib = 0;
-if ($ARGV[0] eq "--contrib") {
-  $do_contrib = 1;
-  shift;
-}
-
-
 die "usage: $0 PKGNAME\n" unless @ARGV == 1;
 $package = $ARGV[0];
 # $::opt_verbosity = 3;  # debug tlpdb reading
@@ -63,6 +60,9 @@
 
 &xchdir ("$mydir/../..");
 my $M = $DEST = getcwd ();  # svn Master, ordinarily where we write
+
+$M = $DEST = $opt_contrib if (defined($opt_contrib));
+
 #
 &xchdir ("..");
 
@@ -101,8 +101,6 @@
 # we do those checks (and possible removals) before making the new TL
 # package, so the "README."  file doesn't get into the data structures.
 
-die("contrib mode not implemented, move packages manually!\n") if ($do_contrib);
-
 

 if (-d "Master") {  # maybe have both Build and Master
   &xchdir ("Master");
@@ -175,7 +173,11 @@
 
   # remove no longer existing files.
   if (! $New{$file}) {
-    &xsystem ("svn remove \"$M/$file\"");
+    if ($opt_mode eq "svn") {
+      &xsystem ("svn remove \"$M/$file\"");
+    } else {
+      &xsystem ("git rm \"$M/$file\"");
+    }
     (my $old_dir = "$M/$file") =~ s,/[^/]*$,,;
     $dirs_with_removals{$old_dir}++;
   }
@@ -216,7 +218,11 @@
 # the directories will not be empty.
 if (! $chicken) {
   for my $empty_dir (&empty_dirs (keys %dirs_with_removals)) {
-    &xsystem ("cd $M && svn remove $empty_dir # empty dir");
+    if ($opt_mode eq "svn") {
+      &xsystem ("cd $M && svn remove $empty_dir # empty dir");
+    } else {
+      &xsystem ("cd $M && rmdir $empty_dir")
+    }
     # already in %dirs, so don't need to add.
   }
 }
@@ -257,8 +263,11 @@
 # Always run svn update, even without --place.  This will let a worker
 # detect that a particular package update has already been done by
 # someone else.
-print ("\nsvn update of those directories:\n");
-system ("svn update `cat $dirlist_file`");
+if ($opt_mode eq "svn") {
+  print ("\nsvn update of those directories:\n");
+  system ("svn update `cat $dirlist_file`");
+}
+# do nothing in git mode
 
 exit (0);
 
@@ -307,6 +316,13 @@
   # when it's needed, (grand*)parents must come first, else have svn
   # "not working copy" error.
   my $newdir = $dir = dirname ($newfile);
+
+  if ($opt_mode eq "git") {
+    &xsystem ("cd $M && git add $newfile");
+    $dirs{$newdir}++;
+    return;
+  }
+    
   my $needed_dirs = "";
   #until (-d "$dir/.svn") {
   until (&is_svn_dir($dir)) {



More information about the tex-live-commits mailing list