From 3745e0216c9d22e511d2195fdf34d741c861ab08 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 5 Dec 2019 23:53:35 +0000 Subject: new abbreviation $DatabaseLocation for tlpkg/texlive.tlpdb; use it in a few places git-svn-id: svn://tug.org/texlive/trunk@53037 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLConfig.pm | 13 +++++++++++++ Master/tlpkg/TeXLive/TLPDB.pm | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive') diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm index 8e698297cc0..8b7f76122b4 100644 --- a/Master/tlpkg/TeXLive/TLConfig.pm +++ b/Master/tlpkg/TeXLive/TLConfig.pm @@ -30,6 +30,7 @@ BEGIN { %Compressors $InfraLocation $DatabaseName + $DatabaseLocation $PackageBackupDir $BlockSize $Archive @@ -82,10 +83,12 @@ our $DefaultCategory = "Package"; # relative to a root (e.g., the Master/, or the installation path) our $InfraLocation = "tlpkg"; our $DatabaseName = "texlive.tlpdb"; +our $DatabaseLocation = "$InfraLocation/$DatabaseName"; # location of backups in default autobackup setting (under tlpkg) our $PackageBackupDir = "$InfraLocation/backups"; +# for computing disk usage; this is most common. our $BlockSize = 4096; # timeout for network connections (wget, LWP) in seconds @@ -312,6 +315,16 @@ The subdirectory with various infrastructure files (C, tlpobj files, ...) relative to the root of the installation; currently C. +=item C<$TeXLive::TLConfig::DatabaseName> + +The name of our so-called database file: C. It's just a +plain text file, not any kind of relational or other database. + +=item C<$TeXLive::TLConfig::DatabaseLocation> + +Concatenation of C "/" C, i.e., +C. + =item C<$TeXLive::TLConfig::BlockSize> The assumed block size, currently 4k. diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 865e3c67ac4..5ff686d5a78 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -91,7 +91,7 @@ C -- A database of TeX Live Packages =cut use TeXLive::TLConfig qw($CategoriesRegexp $DefaultCategory $InfraLocation - $DatabaseName $MetaCategoriesRegexp $Archive + $DatabaseName $DatabaseLocation $MetaCategoriesRegexp $Archive $DefaultCompressorFormat %Compressors $CompressorExtRegexp %TLPDBOptions %TLPDBSettings $ChecksumExtension $RelocPrefix $RelocTree); @@ -148,7 +148,7 @@ sub new { } if (defined($self->{'root'})) { my $nr_packages_read - = $self->from_file("$self->{'root'}/$InfraLocation/$DatabaseName", + = $self->from_file("$self->{'root'}/$DatabaseLocation", 'verify' => $verify); if ($nr_packages_read == 0) { # that is bad, we didn't read anything, so return undef. @@ -1205,7 +1205,7 @@ sub location { tlwarn("TLPDB: cannot get location of a virtual tlpdb\n"); return 0; } - return "$self->{'root'}/$InfraLocation/$DatabaseName"; + return "$self->{'root'}/$DatabaseLocation"; } =pod -- cgit v1.2.3