From 8027c99f372cc214604cb68dc9ed0e2643a634a0 Mon Sep 17 00:00:00 2001 From: Staszek Wawrykiewicz Date: Mon, 22 Jan 2007 23:52:20 +0000 Subject: tlpmgui 1.61 git-svn-id: svn://tug.org/texlive/trunk@3696 c570f23f-e606-0410-a88d-b1316a301751 --- Master/setuptl/Changelog | 3 ++- Master/setuptl/TLPM/blng.pm | 2 +- Master/setuptl/TLPM/check.pm | 2 +- Master/setuptl/TLPM/cmdl.pm | 2 +- Master/setuptl/TLPM/common.pm | 30 +++++++++++++++++++-------- Master/setuptl/TLPM/constants.pm | 2 +- Master/setuptl/TLPM/help.pm | 6 +++++- Master/setuptl/TLPM/incl.pm | 2 +- Master/setuptl/TLPM/info.pm | 2 +- Master/setuptl/TLPM/inst.pm | 2 +- Master/setuptl/TLPM/list.pm | 2 +- Master/setuptl/TLPM/pkg.pm | 40 +++++++++++++++++++----------------- Master/setuptl/TLPM/reg.pm | 2 +- Master/setuptl/TLPM/uninst.pm | 2 +- Master/setuptl/tlpm-i386-linux.pl | 9 ++++---- Master/setuptl/tlpm-x86_64-linux.pl | 9 ++++---- Master/setuptl/tlpm.exe | Bin 448304 -> 449086 bytes Master/setuptl/tlpm.readme | 4 ++++ Master/setuptl/tlpmgui-i386-linux | Bin 1954553 -> 2041932 bytes Master/setuptl/tlpmgui-x86_64-linux | Bin 2194048 -> 2194115 bytes Master/setuptl/tlpmgui.exe | Bin 1263485 -> 1263699 bytes Master/setuptl/tlpmgui.kit | Bin 650284 -> 650897 bytes 22 files changed, 73 insertions(+), 48 deletions(-) diff --git a/Master/setuptl/Changelog b/Master/setuptl/Changelog index 0aa7a8d5463..5b61c166ce3 100644 --- a/Master/setuptl/Changelog +++ b/Master/setuptl/Changelog @@ -1,5 +1,5 @@ ## 2005-2007 Tomasz Luczak tlu@technodat.com.pl -# $Id: Changelog 266 2007-01-20 02:37:31Z tlu $ +# $Id: Changelog 276 2007-01-22 18:01:28Z tlu $ # History: # 2005.05.03 TLu r.0.1 start project # 2005.08.04 TLu r.0.11 last version for TL2004 @@ -26,3 +26,4 @@ # 2007.01.15 TLu r.1.58 added x86_64 library for Tile, x86_64 executable, little improve for win98 # 2007.01.16 TLu r.1.59 improve recognise availables binaries, improve for darwin # 2007.01.20 TLu r.1.60 better sorting packages, improved remove from %PATH% +# 2007.01.22 TLu r.1.61 improved recognise DVD/CD \ No newline at end of file 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] 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; } -¬2log(); +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 [-pfer] 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 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 [-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] 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() { 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 = ; - close INP; + my @lines = ; 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 [-rjF] [dir] diff --git a/Master/setuptl/tlpm-i386-linux.pl b/Master/setuptl/tlpm-i386-linux.pl index c226e0eec54..61728fdac46 100755 --- a/Master/setuptl/tlpm-i386-linux.pl +++ b/Master/setuptl/tlpm-i386-linux.pl @@ -1,8 +1,8 @@ #!/usr/bin/env perl -# 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 -BEGIN{$tlpm_version="2.19";$tlpm_os="i386-linux"} +BEGIN{$tlpm_version="2.20";$tlpm_os="i386-linux"} # the main tlpm script @@ -116,7 +116,7 @@ sub main or &is_opt($arg,'H','Help','readme') and return &readme() or &is_opt($arg,'b','batch') and do {$batch_file = shift @args;$batch_mode = 1} # or &is_opt($arg,'q','quiet') and do {$quiet_mode = 1} - or &is_opt($arg,'D','debug') and do {$debug_mode = 1} + or &is_opt($arg,'D','debug') and do {&enable_dbg();} or &rem_opt($arg) and return $error{'wrong_opt'} -> ($arg,'tlpm --help'); } unless(defined $tl_source){$tl_source = $ENV{'tl_source'}}# ...or remains undefined @@ -140,7 +140,8 @@ sub main } #$quiet_mode = 0; -$debug_mode = 0; +¬2log(); +&disable_dbg(); $batch_mode = 0; $batch_file = ''; diff --git a/Master/setuptl/tlpm-x86_64-linux.pl b/Master/setuptl/tlpm-x86_64-linux.pl index 891db4e609a..daee185caaa 100755 --- a/Master/setuptl/tlpm-x86_64-linux.pl +++ b/Master/setuptl/tlpm-x86_64-linux.pl @@ -1,8 +1,8 @@ #!/usr/bin/env perl -# 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 -BEGIN{$tlpm_version="2.19";$tlpm_os="x86_64-linux"} +BEGIN{$tlpm_version="2.20";$tlpm_os="x86_64-linux"} # the main tlpm script @@ -116,7 +116,7 @@ sub main or &is_opt($arg,'H','Help','readme') and return &readme() or &is_opt($arg,'b','batch') and do {$batch_file = shift @args;$batch_mode = 1} # or &is_opt($arg,'q','quiet') and do {$quiet_mode = 1} - or &is_opt($arg,'D','debug') and do {$debug_mode = 1} + or &is_opt($arg,'D','debug') and do {&enable_dbg();} or &rem_opt($arg) and return $error{'wrong_opt'} -> ($arg,'tlpm --help'); } unless(defined $tl_source){$tl_source = $ENV{'tl_source'}}# ...or remains undefined @@ -140,7 +140,8 @@ sub main } #$quiet_mode = 0; -$debug_mode = 0; +¬2log(); +&disable_dbg(); $batch_mode = 0; $batch_file = ''; diff --git a/Master/setuptl/tlpm.exe b/Master/setuptl/tlpm.exe index 767117ad49f..f48fb73e686 100644 Binary files a/Master/setuptl/tlpm.exe and b/Master/setuptl/tlpm.exe differ diff --git a/Master/setuptl/tlpm.readme b/Master/setuptl/tlpm.readme index e620ad70030..f3b6d6ee8ff 100644 --- a/Master/setuptl/tlpm.readme +++ b/Master/setuptl/tlpm.readme @@ -109,6 +109,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/tlpmgui-i386-linux b/Master/setuptl/tlpmgui-i386-linux index ae495655efa..92b1fea121b 100755 Binary files a/Master/setuptl/tlpmgui-i386-linux and b/Master/setuptl/tlpmgui-i386-linux differ diff --git a/Master/setuptl/tlpmgui-x86_64-linux b/Master/setuptl/tlpmgui-x86_64-linux index 6fba8649488..5dad22ea1de 100755 Binary files a/Master/setuptl/tlpmgui-x86_64-linux and b/Master/setuptl/tlpmgui-x86_64-linux differ diff --git a/Master/setuptl/tlpmgui.exe b/Master/setuptl/tlpmgui.exe index 4b885459e7b..26491bc0a1f 100644 Binary files a/Master/setuptl/tlpmgui.exe and b/Master/setuptl/tlpmgui.exe differ diff --git a/Master/setuptl/tlpmgui.kit b/Master/setuptl/tlpmgui.kit index f12819bd5c2..e1e7e968547 100644 Binary files a/Master/setuptl/tlpmgui.kit and b/Master/setuptl/tlpmgui.kit differ -- cgit v1.2.3