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

0067d1
diff -up ./scripts/texlive/tlmgr.pl.ignore-warning ./scripts/texlive/tlmgr.pl
0067d1
--- ./scripts/texlive/tlmgr.pl.ignore-warning	2019-05-24 21:35:57.384845754 -0400
0067d1
+++ ./scripts/texlive/tlmgr.pl	2019-05-24 21:39:32.703577109 -0400
0067d1
@@ -231,6 +231,7 @@ my %action_specification = (
0067d1
       "dry-run|n" => 1,
0067d1
       "file" => 1,
0067d1
       "force" => 1,
0067d1
+      "ignore-warning" => 1,
0067d1
       "no-depends"        => 1,
0067d1
       "no-depends-at-all" => 1,
0067d1
       "reinstall" => 1,
0067d1
@@ -331,6 +332,7 @@ my %action_specification = (
0067d1
       "dry-run|n" => 1,
0067d1
       "exclude" => "=s@",
0067d1
       "force" => 1,
0067d1
+      "ignore-warning" => 1,
0067d1
       "list" => 1,
0067d1
       "no-auto-install"            => 1,
0067d1
       "no-auto-remove"             => 1,
0067d1
@@ -2613,6 +2615,15 @@ sub upd_info {
0067d1
 }
0067d1
 
0067d1
 sub action_update {
0067d1
+  if (!($opts{"ignore-warning"})) {
0067d1
+    print("*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.\n");
0067d1
+    print("*** WARNING ***: This is almost NEVER what you want to do.\n");
0067d1
+    print("*** WARNING ***: Try using dnf install/update instead.\n");
0067d1
+    print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
0067d1
+    print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
0067d1
+    exit;
0067d1
+  }
0067d1
+
0067d1
   init_local_db(1);
0067d1
   $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
0067d1
 
0067d1
@@ -3618,6 +3629,15 @@ sub check_announce_format_triggers {
0067d1
 # anymore!  That has all to be done by the caller.
0067d1
 #
0067d1
 sub action_install {
0067d1
+  if (!($opts{"ignore-warning"})) {
0067d1
+    print("*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.\n");
0067d1
+    print("*** WARNING ***: This is almost NEVER what you want to do.\n");
0067d1
+    print("*** WARNING ***: Try using dnf install/update instead.\n");
0067d1
+    print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
0067d1
+    print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
0067d1
+    exit;
0067d1
+  } 
0067d1
+
0067d1
   init_local_db(1);
0067d1
   my $ret = $F_OK;
0067d1
   return ($F_ERROR) if !check_on_writable();
0067d1
@@ -8151,6 +8171,13 @@ If updates to C<tlmgr> itself (or other
0067d1
 infrastructure) are present, C<tlmgr> will bail out and not perform the
0067d1
 installation unless this option is given.  Not recommended.
0067d1
 
0067d1
+=item B<--ignore-warning>
0067d1
+
0067d1
+The tlmgr tool can really ruin a Fedora install of TeXLive.
0067d1
+We have added a warning check here to try to keep you from
0067d1
+blindly following a tutorial and doing this. If you still want to
0067d1
+proceed, just use this option.
0067d1
+
0067d1
 =item B<--no-depends>
0067d1
 
0067d1
 Do not install dependencies.  (By default, installing a package ensures
0067d1
@@ -8846,6 +8873,13 @@ In short:
0067d1
 Nothing is actually installed; instead, the actions to be performed are
0067d1
 written to the terminal.  This is a more detailed report than C<--list>.
0067d1
 
0067d1
+=item B<--ignore-warning>
0067d1
+
0067d1
+The tlmgr tool can really ruin a Fedora install of TeXLive.
0067d1
+We have added a warning check here to try to keep you from
0067d1
+blindly following a tutorial and doing this. If you still want to
0067d1
+proceed, just use this option.
0067d1
+
0067d1
 =item B<--list> [I<pkg>]
0067d1
 
0067d1
 Concisely list the packages which would be updated, newly installed, or