summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-10-07 11:17:45 +0000
committerNorbert Preining <preining@logic.at>2009-10-07 11:17:45 +0000
commit4773e66b6b71c419406ad836e67997034ade6568 (patch)
tree9a37c952edebddc3743127a9f73faf454ef2a216 /Master/install-tl
parent8649889a23d0e13292266b9a12ae94c27a361ed4 (diff)
first ask whether import should be done, then import, and give a hint
that warning messages about unknown category Documentation are fine ;-) git-svn-id: svn://tug.org/texlive/trunk@15666 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl28
1 files changed, 20 insertions, 8 deletions
diff --git a/Master/install-tl b/Master/install-tl
index ba4fd19ba87..d11d5c43b46 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -286,7 +286,6 @@ if ($opt_nonadmin and win32()) {
# media, while $localtlpdb is for the new installation
# $tlpdb must be our because it is used in install-menu-text.pl
our $tlpdb;
-our $previoustlpdb;
my $localtlpdb;
my $location;
@@ -517,13 +516,8 @@ if ($opt_profile eq "") {
my $install_tl_root = abs_path($::installerdir);
my $tlpdboldpath = "$dn/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName";
if (-r $tlpdboldpath && $dn ne $install_tl_root) {
- # we found an old installation, so read that one in and save
- # the list installed collections into an array.
- $previoustlpdb = TeXLive::TLPDB->new(root => $dn);
- if ($previoustlpdb) {
- debug ("found old installation in $dn\n");
- push @runargs, "-old-installation-found";
- }
+ debug ("found old installation in $dn\n");
+ push @runargs, "-old-installation-found=$dn";
}
}
}
@@ -1406,6 +1400,24 @@ sub save_options_into_tlpdb {
sub import_settings_from_old_tlpdb {
+ my $dn = shift;
+ my $tlpdboldpath = "$dn/$TeXLive::TLConfig::InfraLocation/$TeXLive::TLConfig::DatabaseName";
+ my $previoustlpdb;
+ if (-r $tlpdboldpath) {
+ # we found an old installation, so read that one in and save
+ # the list installed collections into an array.
+ info ("Trying to load old TeX Live Database,\n");
+ info ("ignore warnings on unknown category Documentation\n");
+ $previoustlpdb = TeXLive::TLPDB->new(root => $dn);
+ if ($previoustlpdb) {
+ info ("Importing settings from old installation in $dn\n");
+ } else {
+ tlwarn ("Cannot load old TLPDB, continuing with normal installation.\n");
+ return;
+ }
+ } else {
+ return;
+ }
# first import the collections
# since the scheme is not the final word we select scheme-custom here
# and then set the single collections by hand