summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2022-03-09 01:23:17 +0000
committerNorbert Preining <preining@logic.at>2022-03-09 01:23:17 +0000
commita3697b55e4bc92acb92fa85d0d604d1b1373695f (patch)
tree185baf6b281833eb577694241b2ebaa616973a5d
parent7704d940c95f2dae4c0a4f4f0d77147b15169bc0 (diff)
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
-rwxr-xr-xMaster/install-tl6
-rw-r--r--Master/tlpkg/installer/install-menu-text.pl16
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();
}
}