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

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