summaryrefslogtreecommitdiff
path: root/Master/setuptl/TLPM/pkg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/setuptl/TLPM/pkg.pm')
-rw-r--r--Master/setuptl/TLPM/pkg.pm68
1 files changed, 35 insertions, 33 deletions
diff --git a/Master/setuptl/TLPM/pkg.pm b/Master/setuptl/TLPM/pkg.pm
index d91ce764963..ecf5115cee5 100644
--- a/Master/setuptl/TLPM/pkg.pm
+++ b/Master/setuptl/TLPM/pkg.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.20, TeX Live Package Manager
+# This file belongs to TLPM v2.21, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# packages handling
@@ -205,40 +205,42 @@ sub is_tl_root
sub no_source # source detection heuristic
{
my $dir = shift;
- my ($inst,$live) = ("00INST.TL","00LIVE.TL");
+ my ($inst,$live) = ("00INST.TL","00LIVE.TL");
&norm_path($dir);
$dir = &rel2abs($dir);
- #if(-f "$dir$chr_dirsep.mkisofsrc")# hidden can be easily missed while copying...
- #{ # (Hartmut Henkel report)
- if(-f "$dir$chr_dirsep$inst")
- {
- $messdbg -> ("Found $inst in $dir");
- $tl_type = 'CD'; $tl_file = $inst;
- }
- elsif(-f "$dir$chr_dirsep$live")
- {
- $messdbg -> ("Found $live in $dir");
- $tl_type = 'DVD'; $tl_file = $live;
- }
- else
- {
- $messdbg -> ("Neither $inst nor $live found in $dir");
- return $true;
- }
- $tl_source = $dir; $tl_source_indeed = $true;
- local *INP;
- open(INP,"<$dir$chr_dirsep$tl_file") or return $error{'wrong_inp'} -> ($tl_file);
- my @lines = <INP>; close INP;
- foreach(@lines)
- {
- next unless /\ARelease date: (\d{8})/;
- $tl_date = $1;
- $tl_year = substr($tl_date,0,4);
- return $false;
- }
- $messdbg -> ("Cannot retrieve release info from $tl_file");
- #}
- return $true;
+ #if(-f "$dir$chr_dirsep.mkisofsrc")# hidden can be easily missed while copying (Hartmut Henkel report)
+ if(-f "$dir$chr_dirsep$inst")
+ {
+ $messdbg -> ("Found $inst in $dir");
+ $tl_type = 'CD'; $tl_file = $inst;
+ }
+ elsif(-f "$dir$chr_dirsep$live")
+ {
+ $messdbg -> ("Found $live in $dir");
+ $tl_type = 'DVD'; $tl_file = $live;
+ }
+ else
+ {
+ $messdbg -> ("Neither $inst nor $live found in $dir");
+ return $true;
+ }
+ $tl_source = $dir; $tl_source_indeed = $true;
+ local *INP;
+ open(INP,"<$dir$chr_dirsep$tl_file") or return $error{'wrong_inp'} -> ($tl_file);
+ my @lines = <INP>; close INP;
+ foreach(@lines)
+ {
+ next unless /\ARelease date: (\d{8})/;
+ $tl_date = $1;
+ $tl_year = substr($tl_date,0,4);
+ return $false;
+ }
+ #$messdbg -> ("Cannot retrieve release info from $tl_file");
+ #return $true; # inconvenient while playing with TL Master tree, where
+ # no release is yet defined
+ $warning -> ("Cannot retrieve release info from $tl_file");
+ $tl_date = "????.??.??"; $tl_year = "????";
+ return $false;
}
# in opposite to source packages, target is read whenever requested