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

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