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

80 lines
3.2 KiB
Diff
Raw Normal View History

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