summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc/list-new-packages.diff
blob: 4f3a1f2aa7e02920c6b65eb81779cefe5bebfd06 (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
Index: tlmgr.pl
===================================================================
--- tlmgr.pl	(revision 10450)
+++ tlmgr.pl	(working copy)
@@ -621,6 +621,27 @@
   } else {
     @todo = @ARGV;
   }
+  if ($opt_list) {
+    # we check for new packages
+    # loop over all installed collections
+    for my $c ($localtlpdb->collections) {
+      my $tlc = $mediatlpdb->get_package($c);
+      if (!defined($tlc)) {
+        debug("collection $c has disappeared from the network!\n");
+      } else {
+        # take all the dependencies of the installed collection 
+        # *as*found* in the network tlpdb
+        for my $d ($tlc->depends) {
+          my $tlp = $localtlpdb->get_package($d);
+          if (!defined($tlp)) {
+            # there is a dep that is either new or has been forcibly removed
+            # report it as new/forcibly removed
+            info("package $d ($c) is new (or has been forcibly removed)\n");
+          }
+        }
+      }
+    }
+  }
   if (!@todo) {
     printf "tlmgr update takes either a list of packages or --all\n";
   }