From cc66a70788e2ffe5b72298345ec3fa0ff2eaa53b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 27 Dec 2007 11:33:46 +0000 Subject: add check-execute-consistency, add $tlpdb->find_file and $tlpobj->contains_file git-svn-id: svn://tug.org/texlive/trunk@5953 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm') diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 0d2fdea3af1..fc6f6f5edb4 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -764,6 +764,17 @@ sub remove_files { $self->{"${type}files"} = [ @finalfiles ]; } +sub contains_file { + my ($self,$fn) = @_; + # if the filename already contains a / do not add it at the beginning + my $ret = ""; + if ($fn =~ m!/!) { + return(grep(m!$fn$!, $self->all_files)); + } else { + return(grep(m!/$fn$!,$self->all_files)); + } +} + sub all_files { my ($self) = shift; my @ret = (); @@ -1222,6 +1233,12 @@ adds or removes files from the list of C for the given architecture. adds or removes files for the given type (only for C, C, C). +=item C + +returns the list of files matching $filename which are contained in +the package. If $filename contains a / the matching is only anchored +at the end with $. Otherwise it is prefix with a / and anchored at the end. + =item C returns a list of all files of all types. -- cgit v1.2.3