From a3697b55e4bc92acb92fa85d0d604d1b1373695f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 9 Mar 2022 01:23:17 +0000 Subject: install-tl: disk check text mode installer shows required/free space warn on installation if space does not suffice allow overriding git-svn-id: svn://tug.org/texlive/trunk@62539 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 6 +++++- Master/tlpkg/installer/install-menu-text.pl | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Master/install-tl b/Master/install-tl index fd8c1685c64..9dd4a6c5a4c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -951,7 +951,11 @@ sub do_installation { if ($diskfree != -1) { my $reserve = 100; if ( $diskfree + $reserve < $vars{'total_size'}) { - die("DISK SPACE INSUFFICIENT!"); + if ($ENV{'TEXLIVE_INSTALL_NO_DISKCHECK'}) { + tlwarn("Insufficient disk space, but continuing anyway."); + } else { + die("DISK SPACE INSUFFICIENT!"); + } } } # now remove final slash from TEXDIR even if it is the root of a drive diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 166a8776391..f5bab546808 100644 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -963,6 +963,7 @@ sub quit { sub do_install { my $reserve = 100; + my $doit = 1; if ($vars{'free_size'} > 0 && $vars{'free_size'} + $reserve < $vars{'total_size'}) { print STDERR <<"EOF"; @@ -974,13 +975,22 @@ You probably want to either clean up the destination filesystem, or choose a different installation location, or reduce what gets installed. -Press Enter to return to the menu. +Press Enter to return to the menu, or type i to install anyway. *************************************************************** EOF my $ans = readline (*STDIN); - main_menu(); - } else { + $doit = 0; + chomp($ans); + if ($ans eq "i" or $ans eq "I") { + $doit = 1; + } + } + if ($doit) { + # set env variable to make install-tl not trip over + $ENV{'TEXLIVE_INSTALL_NO_DISKCHECK'} = 1; $RETURN = $MENU_INSTALL; + } else { + main_menu(); } } -- cgit v1.2.3