diff options
author | Norbert Preining <preining@logic.at> | 2007-12-03 06:46:33 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-03 06:46:33 +0000 |
commit | 9c03f70819a69618c0fd3c919d0beba8f7fa0da4 (patch) | |
tree | 35e7a3da61eb4d433a0ea9ad7e41102a7a30953b /Master/tlpkg | |
parent | 1ebbc2dcd0006bc7029a2be1cc58460158f27abc (diff) |
get rid of Cwd for the installer
git-svn-id: svn://tug.org/texlive/trunk@5688 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 3 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 13 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 752746f3834..83943141b64 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -42,7 +42,6 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages use TeXLive::TLConfig qw($CategoriesRegexp $DefaultCategory); use TeXLive::TLUtils; use TeXLive::TLPOBJ; -use Cwd; my $_listdir; @@ -205,6 +204,7 @@ adds new dependencies they are not necessarily fulfilled. sub add_tlpcontainer { my ($self, $package, $ziplocation, $archrefs, $dest) = @_; my @archs; + require Cwd; if (defined($archrefs)) { @archs = @$archrefs; } @@ -224,6 +224,7 @@ sub _add_tlpcontainer { my ($self, $package, $ziplocation, $arch, $dest) = @_; my $unpackprog; my $args; + require Cwd; # WARNING: If you change the location of the texlive.tlpdb this # has to be changed, too!! if (not(defined($dest))) { diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 9a73d6bd8da..844a449ef9e 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -9,7 +9,6 @@ package TeXLive::TLPOBJ; use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp $InfraLocation); use TeXLive::TLUtils; #use File::Path; -use Cwd; use TeXLive::TLTREE; #use FileHandle; # $fh->getline() in from_fh, can we rewritten #use File::Basename; @@ -256,7 +255,10 @@ sub _recompute_size { sub writeout { my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); - format_name $fd "multilineformat"; + # ugly hack to get rid of the FileHandle module, see man perlform + # which is needed for format_name + #format_name $fd "multilineformat"; + select((select($fd),$~ = "multilineformat")[0]); print $fd "name ", $self->name, "\n"; print $fd "category ", $self->category, "\n"; defined($self->{'revision'}) && print $fd "revision $self->{'revision'}\n"; @@ -319,7 +321,10 @@ sub writeout { sub writeout_simple { my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); - format_name $fd "multilineformat"; + # ugly hack to get rid of the FileHandle module, see man perlform + # which is needed for format_name + #format_name $fd "multilineformat"; + select((select($fd),$~ = "multilineformat")[0]); print $fd "name ", $self->name, "\n"; print $fd "category ", $self->category, "\n"; if (defined($self->{'depends'})) { @@ -533,6 +538,8 @@ sub make_container { map { s@^$tltree/@@ ; push @nf, $_; } @files; @files = @nf; } + # load Cwd only if necessary ... + require Cwd; my $cwd = &getcwd; if ("$destdir" !~ m@^/@) { # we have an relative containerdir, so we have to make it absolute |