summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc/tl-update-containers.diff
blob: 82d44a6b4a8eb5e7b72f73754a7f13f11839f2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Index: tl-update-containers
===================================================================
--- tl-update-containers	(revision 10389)
+++ tl-update-containers	(working copy)
@@ -23,16 +23,21 @@
 use Pod::Usage;
 use File::Path;
 
+
+my @critical_pkg_list = qw/bin-texlive texlive\.infra/;
+
 our $mydir;
 my $opt_location = ".";
 my $opt_relative = 0;
 my $opt_recreate = 0;
 my $help = 0;
+my $opt_all = 0;
 
 TeXLive::TLUtils::process_logging_options();
 GetOptions(
   "location=s"     => \$opt_location, 
   "recreate"       => \$opt_recreate,
+  "all|a"          => \$opt_all,
   "help|?"         => \$help) or pod2usage(1);
 
 pod2usage(-exitstatus => 0, -verbose => 2) if $help;
@@ -144,9 +149,30 @@
   &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer");
 
   # get list of packages.
-  for my $pkg (sort @todopacks) {
+  PACKS: for my $pkg (sort @todopacks) {
     next if ($pkg eq "00texlive.config");
     next if ($pkg eq "00texlive.installer");
+    foreach my $manualpkgre (@critical_pkg_list) {
+      # we match the initial string of the package name, so that all the
+      # .arch packages are skipped, too
+      if ($pkg =~ m/^$manualpkgre/) {
+        if ($opt_all || $opt_recreate) {
+          tlwarn ("updating container for $pkg due to -all option!\n");
+          last; # of the manualpkgre checks
+        } else {
+          tlwarn ("not updating $pkg since it it in the manual update list!\n");
+          # we assume that the packages in @critical_pkg_list always
+          # exist, so if they are there then the number of updated packages
+          # should be reduced.
+          $count{'updated'}--;
+          # the following line skips all other regexp checks on critical
+          # packages and skips everything below this big for list (the
+          # part which actually builds the containers) and continues with
+          # the next package (the PACKS: for my $pkg (sort @todopacks) line
+          next PACKS;
+        }
+      }
+    }
     my $obj = $tlpdb->get_package ($pkg);
     die "$0: no TL package named $pkg in $Master" if ! $obj;
     debug("updating $pkg containers ...\n");
@@ -198,7 +224,7 @@
   }
 
   # next we remove those containers which have been gone!
-  foreach my $op (@removepacks) {
+  for my $op (@removepacks) {
     info("$op has disappeared, removing its containers\n");
     `rm $opt_containerdir/$op.*`;
     $nettlpdb->remove_package($op);
@@ -247,6 +273,13 @@
 The location to find the previously generated containers;
 default is C<./archive>.  
 
+=item B<-recreate>
+Does a full rebuild of all packages.
+
+=item B<-all|-a>
+Will update also packages which are exempted due to possible breakage
+(currently texlive.infra and bin-texlive).
+
 =back
 
 The standard options C<-help> and C<-debug> are also accepted.