diff options
author | Norbert Preining <preining@logic.at> | 2008-05-16 08:35:36 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-16 08:35:36 +0000 |
commit | 9b53f4b0fdb19b1e98a97db2659aac99d032c9b9 (patch) | |
tree | 817521c1fef1a915e10d30b1e338ff3761a2d560 /Master | |
parent | e9eba5739ddc72b9c08a3b17f949a3584c299277 (diff) |
PostInstall and PostRemove actions:
- rename TLPostInstall to TLPostActions
- use that one in TLMedia and install-tl
- call the post removal code refs in tlmgr:remove_package
git-svn-id: svn://tug.org/texlive/trunk@8172 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 2 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 5 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLMedia.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPostActions.pm (renamed from Master/tlpkg/TeXLive/TLPostInstall.pm) | 13 |
4 files changed, 14 insertions, 8 deletions
diff --git a/Master/install-tl b/Master/install-tl index 1932e46baed..8659cd31d0c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -49,7 +49,7 @@ use TeXLive::TLUtils qw(initialize_installer media platform platform_desc use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; -use TeXLive::TLPostInstall; +use TeXLive::TLPostActions; use Pod::Usage; use Cwd 'abs_path'; diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index cf3bacf9836..051148ba663 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -240,6 +240,11 @@ sub remove_package { # disadvantage: removing a collection calls the save routine several times # still I consider it better that the tlpdb is in a consistent state $localtlpdb->save; + # do the post removal actions + if (defined($PostRemove{$pkg})) { + tllog($::LOG_NORMAL, "running post remove action for $pkg\n"); + &{$PostRemove{$pkg}}($totlpdb->root); + } } return \%ret; } diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm index 67624c2ea39..bddbdd529fd 100644 --- a/Master/tlpkg/TeXLive/TLMedia.pm +++ b/Master/tlpkg/TeXLive/TLMedia.pm @@ -9,7 +9,7 @@ package TeXLive::TLMedia; use TeXLive::TLConfig; -use TeXLive::TLPostInstall; +use TeXLive::TLPostActions; use TeXLive::TLUtils qw(tllog copy win32 dirname mkdirhier conv_to_win_path basename download_file merge_into); use TeXLive::TLPDB; use Cwd qw/abs_path/; diff --git a/Master/tlpkg/TeXLive/TLPostInstall.pm b/Master/tlpkg/TeXLive/TLPostActions.pm index 07591f9a6a9..bc0c82509ca 100644 --- a/Master/tlpkg/TeXLive/TLPostInstall.pm +++ b/Master/tlpkg/TeXLive/TLPostActions.pm @@ -1,10 +1,10 @@ # $Id$ -# TeXLive::TLPostInstall.pm - collection post install stuff for installation +# TeXLive::TLPostActions.pm - collection post install stuff for installation # Copyright 2008 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -package TeXLive::TLPostInstall; +package TeXLive::TLPostActions; BEGIN { use Exporter (); @@ -19,6 +19,7 @@ BEGIN { use TeXLive::TLUtils qw(win32 mkdirhier copy); our %PostInstall; +our %PostRemove; sub do_bin_xetex { @@ -187,16 +188,16 @@ sub do_context { =head1 NAME -C<TeXLive::TLPostInstall> -- TeX Live Post Installation Routines +C<TeXLive::TLPostActions> -- TeX Live Post Installation and Removal Routines =head1 SYNOPSIS - use TeXLive::TLPostInstall; + use TeXLive::TLPostActions; =head1 DESCRIPTION -The L<TeXLive::TLPostInstall> module exports the C<%PostInstall> hash indexed -by package names providing code references. +The L<TeXLive::TLPostActions> module exports the C<%PostInstall> and +the C<%PostRemove> hash indexed by package names providing code references. These code references are called with the root of the installation as argument (C<$SELFAUTOPARENT>). Additional arguments, but not necessarily |