texlive[56058] Master/texmf-dist/scripts/texlive/tlmgr.pl: better

commits+preining at tug.org commits+preining at tug.org
Thu Aug 6 03:41:42 CEST 2020


Revision: 56058
          http://tug.org/svn/texlive?view=revision&revision=56058
Author:   preining
Date:     2020-08-06 03:41:42 +0200 (Thu, 06 Aug 2020)
Log Message:
-----------
better reporting in case of no updates available

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2020-08-05 23:59:41 UTC (rev 56057)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2020-08-06 01:41:42 UTC (rev 56058)
@@ -2736,14 +2736,13 @@
   } else {
     @todo = @ARGV;
   }
+  if ($opts{"self"} && !@critical) {
+    info("$prg: no self-updates for tlmgr available\n");
+  }
   # don't do anything if we have been invoked in a strange way
-  if (!@todo) {
-    if ($opts{"self"}) {
-      info("$prg: no self-updates for tlmgr available.\n");
-    } else {
-      tlwarn("$prg update: please specify a list of packages, --all, or --self.\n");
-      return ($F_ERROR);
-    }
+  if (!@todo && !$opts{"self"}) {
+    tlwarn("$prg update: please specify a list of packages, --all, or --self.\n");
+    return ($F_ERROR);
   }
 
   if (!($opts{"self"} && @critical) || ($opts{"self"} && $opts{"list"})) {
@@ -3585,7 +3584,9 @@
   # if a real update from default disk location didn't find anything,
   # warn if nothing is updated.  Unless they said --self, in which case
   # we've already reported it.
-  if (!(@new || @updated) && ! $opts{"self"}) {
+  # But if --self --all was given, and *no* update available for
+  # critical packages, then we should report it, too!
+  if (!(@new || @updated) && ( !$opts{"self"} || @todo )) {
     if (!$::machinereadable) {
       info("$prg: no updates available\n");
       if ($remotetlpdb->media ne "NET"



More information about the tex-live-commits mailing list.