summaryrefslogtreecommitdiff
path: root/Master/setuptl/TLPM
diff options
context:
space:
mode:
authorStaszek Wawrykiewicz <staw@gust.org.pl>2007-01-22 23:52:20 +0000
committerStaszek Wawrykiewicz <staw@gust.org.pl>2007-01-22 23:52:20 +0000
commit8027c99f372cc214604cb68dc9ed0e2643a634a0 (patch)
tree85bb0ae0c7326f653fd0ec2a8877204b6dc5dfd7 /Master/setuptl/TLPM
parente1a058df6a05c82f595065a81b9b495776a67d86 (diff)
tlpmgui 1.61
git-svn-id: svn://tug.org/texlive/trunk@3696 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/setuptl/TLPM')
-rw-r--r--Master/setuptl/TLPM/blng.pm2
-rw-r--r--Master/setuptl/TLPM/check.pm2
-rw-r--r--Master/setuptl/TLPM/cmdl.pm2
-rw-r--r--Master/setuptl/TLPM/common.pm30
-rw-r--r--Master/setuptl/TLPM/constants.pm2
-rw-r--r--Master/setuptl/TLPM/help.pm6
-rw-r--r--Master/setuptl/TLPM/incl.pm2
-rw-r--r--Master/setuptl/TLPM/info.pm2
-rw-r--r--Master/setuptl/TLPM/inst.pm2
-rw-r--r--Master/setuptl/TLPM/list.pm2
-rw-r--r--Master/setuptl/TLPM/pkg.pm40
-rw-r--r--Master/setuptl/TLPM/reg.pm2
-rw-r--r--Master/setuptl/TLPM/uninst.pm2
13 files changed, 57 insertions, 39 deletions
diff --git a/Master/setuptl/TLPM/blng.pm b/Master/setuptl/TLPM/blng.pm
index 1071298ccf5..a2b951d44a7 100644
--- a/Master/setuptl/TLPM/blng.pm
+++ b/Master/setuptl/TLPM/blng.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# blng [-pf] <name>
diff --git a/Master/setuptl/TLPM/check.pm b/Master/setuptl/TLPM/check.pm
index 89390961f3f..5d89864d933 100644
--- a/Master/setuptl/TLPM/check.pm
+++ b/Master/setuptl/TLPM/check.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# check [-pf]
diff --git a/Master/setuptl/TLPM/cmdl.pm b/Master/setuptl/TLPM/cmdl.pm
index bb52becb9a8..80b96fc2b58 100644
--- a/Master/setuptl/TLPM/cmdl.pm
+++ b/Master/setuptl/TLPM/cmdl.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# cmdline parsing
diff --git a/Master/setuptl/TLPM/common.pm b/Master/setuptl/TLPM/common.pm
index a9e9cfcfc2d..b3cfe655bc0 100644
--- a/Master/setuptl/TLPM/common.pm
+++ b/Master/setuptl/TLPM/common.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# common procedures;
@@ -119,9 +119,11 @@ sub set
$message_prefix = '% ';
$warning_prefix = '! ';
+$messdbg_prefix = '? ';
$_message = sub {return "$message_prefix$_[0]\n"};
$_warning = sub {return "$warning_prefix$_[0]\n"};
+$_messdbg = sub {return "$messdbg_prefix$_[0]\n"};
# printing to non-existing handle produce 'Bad file descriptor' error;
# we don't have fork so printing to log and terminal needs to be parallel;
@@ -173,7 +175,24 @@ sub not2log
$warning = \&_warning;
}
-&not2log();
+sub enable_dbg
+{
+ $debug_mode = 1;
+ $messdbg = sub {print STDOUT $_messdbg -> (@_)}
+}
+
+sub disable_dbg
+{
+ $debug_mode = 0;
+ $messdbg = \&relax
+}
+
+# -)
+
+sub relax
+{
+ return; # not zero!
+}
# singular vs plural
@@ -231,11 +250,4 @@ sub percent
return sprintf("%d%%",$_[0]*100/$_[1]);
}
-# -)
-
-sub relax
-{
- return; # not zero!
-}
-
1;
diff --git a/Master/setuptl/TLPM/constants.pm b/Master/setuptl/TLPM/constants.pm
index b7a85c69a8f..1b070aaf7db 100644
--- a/Master/setuptl/TLPM/constants.pm
+++ b/Master/setuptl/TLPM/constants.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# widely used constants
diff --git a/Master/setuptl/TLPM/help.pm b/Master/setuptl/TLPM/help.pm
index 5a970d7c114..48a97364ab2 100644
--- a/Master/setuptl/TLPM/help.pm
+++ b/Master/setuptl/TLPM/help.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# help
@@ -145,6 +145,10 @@ Bugs reports and comments are welcome (tlpmgui\@gust.org.pl)
not kept in the environment during TLPM session), we introduce
new 'set' command
12.01.2007, 2.19 -- protection from defining variables of empty name
+21.01.2007, 2.20 -- modified source detection heuristic; .mkisofsrc file is no longer
+ checked, since as hidden, it can be easily missed while copying;
+ debug messages added for detection; release date added to
+ welcome message
* Known issues
1. Installation from DVD is much slower than from CD. Sorry...
diff --git a/Master/setuptl/TLPM/incl.pm b/Master/setuptl/TLPM/incl.pm
index 371a760415d..cef11e58fad 100644
--- a/Master/setuptl/TLPM/incl.pm
+++ b/Master/setuptl/TLPM/incl.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# incl <pkg> [-pfer] <mask>
diff --git a/Master/setuptl/TLPM/info.pm b/Master/setuptl/TLPM/info.pm
index 6ae1a67e291..6b9a0c86744 100644
--- a/Master/setuptl/TLPM/info.pm
+++ b/Master/setuptl/TLPM/info.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# info <pkg>
diff --git a/Master/setuptl/TLPM/inst.pm b/Master/setuptl/TLPM/inst.pm
index 65b5614b61e..838b1a1dc4d 100644
--- a/Master/setuptl/TLPM/inst.pm
+++ b/Master/setuptl/TLPM/inst.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# inst <pkg> [-jrou]
diff --git a/Master/setuptl/TLPM/list.pm b/Master/setuptl/TLPM/list.pm
index 8d8981bc941..89fbf02d520 100644
--- a/Master/setuptl/TLPM/list.pm
+++ b/Master/setuptl/TLPM/list.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# list [-pfe] <mask>
diff --git a/Master/setuptl/TLPM/pkg.pm b/Master/setuptl/TLPM/pkg.pm
index a02cc4e9b8b..d91ce764963 100644
--- a/Master/setuptl/TLPM/pkg.pm
+++ b/Master/setuptl/TLPM/pkg.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# packages handling
@@ -64,7 +64,8 @@ sub read_pkges # used for reading both source and target packages
}
}
}
- open(INP,"<$dir$chr_dirsep$pkg") or next;
+ open(INP,"<$dir$chr_dirsep$pkg")
+ or $error{'wrong_inp'} -> ("$dir$chr_dirsep$pkg") and next;
foreach(<INP>)
{
chomp;
@@ -195,47 +196,48 @@ sub is_tl_root
foreach(@tl_roots)
{
next if &no_source($dir . $_);
- $message -> ("Welcome to TeX Live $tl_year $tl_type!");
+ $message -> ("Welcome to TeX Live $tl_year $tl_type! (release $tl_date)");
return $true;
}
return $false;
}
-sub no_source # strongly heuristic
+sub no_source # source detection heuristic
{
my $dir = shift;
+ my ($inst,$live) = ("00INST.TL","00LIVE.TL");
&norm_path($dir);
$dir = &rel2abs($dir);
- if(-f "$dir$chr_dirsep.mkisofsrc")
- {
- if(-f "$dir$chr_dirsep" . "00INST.TL")
+ #if(-f "$dir$chr_dirsep.mkisofsrc")# hidden can be easily missed while copying...
+ #{ # (Hartmut Henkel report)
+ if(-f "$dir$chr_dirsep$inst")
{
- $tl_type = 'CD';
- $tl_file = '00INST.TL';
+ $messdbg -> ("Found $inst in $dir");
+ $tl_type = 'CD'; $tl_file = $inst;
}
- elsif(-f "$dir$chr_dirsep" . "00LIVE.TL")
+ elsif(-f "$dir$chr_dirsep$live")
{
- $tl_type = 'DVD';
- $tl_file = '00LIVE.TL';
+ $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;
+ $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;
+ my @lines = <INP>; close INP;
foreach(@lines)
{
- next unless /\ARelease date: (\d{8}\.)/;
- $tl_date = $1; # meybe we will use it
+ 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;
}
diff --git a/Master/setuptl/TLPM/reg.pm b/Master/setuptl/TLPM/reg.pm
index 09246a2e7dc..0db387e801a 100644
--- a/Master/setuptl/TLPM/reg.pm
+++ b/Master/setuptl/TLPM/reg.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# regexp and mask related functions
diff --git a/Master/setuptl/TLPM/uninst.pm b/Master/setuptl/TLPM/uninst.pm
index f04fc5092db..bb0bc359cb8 100644
--- a/Master/setuptl/TLPM/uninst.pm
+++ b/Master/setuptl/TLPM/uninst.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.19, TeX Live Package Manager
+# This file belongs to TLPM v2.20, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# uninst <pkg> [-rjF] [dir]