Blame SOURCES/texlive-20180414-tlmgr-ignore-warning.patch

3c518f
diff -up texmf-dist/scripts/texlive/tlmgr.pl.orig texmf-dist/scripts/texlive/tlmgr.pl
3c518f
--- texmf-dist/scripts/texlive/tlmgr.pl.orig	2017-09-13 03:55:27.000000000 +0200
3c518f
+++ texmf-dist/scripts/texlive/tlmgr.pl	2020-07-24 15:01:13.810411690 +0200
3c518f
@@ -225,6 +225,7 @@ my %action_specification = (
3c518f
       "dry-run|n" => 1,
3c518f
       "file" => 1,
3c518f
       "force" => 1,
3c518f
+      "ignore-warning" => 1,
3c518f
       "no-depends"        => 1,
3c518f
       "no-depends-at-all" => 1,
3c518f
       "reinstall" => 1,
3c518f
@@ -329,6 +330,7 @@ my %action_specification = (
3c518f
       "dry-run|n" => 1,
3c518f
       "exclude" => "=s@",
3c518f
       "force" => 1,
3c518f
+      "ignore-warning" => 1,
3c518f
       "list" => 1,
3c518f
       "no-auto-install"            => 1,
3c518f
       "no-auto-remove"             => 1,
3c518f
@@ -2339,6 +2341,15 @@ sub upd_info {
3c518f
 }
3c518f
 
3c518f
 sub action_update {
3c518f
+  if (!($opts{"ignore-warning"})) {
3c518f
+    print("*** WARNING ***: Performing this action will likely destroy the RHEL TeXLive install on your system.\n");
3c518f
+    print("*** WARNING ***: This is almost NEVER what you want to do.\n");
3c518f
+    print("*** WARNING ***: Try using dnf install/update instead.\n");
3c518f
+    print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
3c518f
+    print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
3c518f
+    exit;
3c518f
+  }
3c518f
+
3c518f
   init_local_db(1);
3c518f
   $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
3c518f
 
3c518f
@@ -3336,6 +3347,15 @@ sub check_announce_format_triggers {
3c518f
 # anymore!  That has all to be done by the caller.
3c518f
 #
3c518f
 sub action_install {
3c518f
+  if (!($opts{"ignore-warning"})) {
3c518f
+    print("*** WARNING ***: Performing this action will likely destroy the RHEL TeXLive install on your system.\n");
3c518f
+    print("*** WARNING ***: This is almost NEVER what you want to do.\n");
3c518f
+    print("*** WARNING ***: Try using dnf install/update instead.\n");
3c518f
+    print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
3c518f
+    print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
3c518f
+    exit;
3c518f
+  } 
3c518f
+
3c518f
   init_local_db(1);
3c518f
   my $ret = $F_OK;
3c518f
   return ($F_ERROR) if !check_on_writable();
3c518f
@@ -7657,6 +7677,13 @@ If updates to C<tlmgr> itself (or other
3c518f
 infrastructure) are present, C<tlmgr> will bail out and not perform the
3c518f
 installation unless this option is given.  Not recommended.
3c518f
 
3c518f
+=item B<--ignore-warning>
3c518f
+
3c518f
+The tlmgr tool can really ruin a RHEL install of TeXLive.
3c518f
+We have added a warning check here to try to keep you from
3c518f
+blindly following a tutorial and doing this. If you still want to
3c518f
+proceed, just use this option.
3c518f
+
3c518f
 =item B<--no-depends>
3c518f
 
3c518f
 Do not install dependencies.  (By default, installing a package ensures
3c518f
@@ -8275,6 +8302,13 @@ In short:
3c518f
 Nothing is actually installed; instead, the actions to be performed are
3c518f
 written to the terminal.  This is a more detailed report than C<--list>.
3c518f
 
3c518f
+=item B<--ignore-warning>
3c518f
+
3c518f
+The tlmgr tool can really ruin a RHEL install of TeXLive.
3c518f
+We have added a warning check here to try to keep you from
3c518f
+blindly following a tutorial and doing this. If you still want to
3c518f
+proceed, just use this option.
3c518f
+
3c518f
 =item B<--list> [I<pkg>]
3c518f
 
3c518f
 Concisely list the packages which would be updated, newly installed, or