summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-27 11:33:46 +0000
committerNorbert Preining <preining@logic.at>2007-12-27 11:33:46 +0000
commitcc66a70788e2ffe5b72298345ec3fa0ff2eaa53b (patch)
tree59155582b406101c70420b2184b26be11a111dec /Master/tlpkg/TeXLive/TLPOBJ.pm
parent8322c99a6cf060c963dd390638034c8d480a537b (diff)
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
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm17
1 files changed, 17 insertions, 0 deletions
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<binfiles> for the given architecture.
adds or removes files for the given type (only for C<run>, C<src>, C<doc>).
+=item C<contains_file($filename)>
+
+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<all_files>
returns a list of all files of all types.