From 86e8b848796998fd360fd171efe5c569f629714c Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Tue, 8 May 2007 05:45:49 +0000 Subject: restoring file state as of the Big SVN Breakage --- lib/Youri/Repository.pm | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/Youri/Repository.pm b/lib/Youri/Repository.pm index bbdd5e3..2434cb4 100644 --- a/lib/Youri/Repository.pm +++ b/lib/Youri/Repository.pm @@ -303,14 +303,9 @@ sub get_files { print "Looking for files matching $pattern in $root/$path\n" if $self->{_verbose} > 1; - my @files = - grep { -f } - glob "$root/$path/*"; - - @files = - grep { basename($_) =~ /^$pattern$/ } - @files - if $pattern; + my $grep = ""; + $grep = "-regextype posix-egrep -regex '.*\/$pattern'" if ($pattern); + my @files = map { chop; $_; } `find -L $root/$path $grep -type f`; return @files; } @@ -328,6 +323,23 @@ sub get_install_root { return $self->{_install_root}; } + +=head2 get_distribution_roots() + +Returns distribution roots (ie install_root + target + arch) +(it returns a list in case of noarch) + +=cut + +sub get_distribution_roots { + my ($self, $package, $target) = @_; + croak "Not a class method" unless ref $self; + + map { + $self->_get_dir($self->{_install_root}, $_); + } $self->get_distribution_paths($package, $target); +} + =head2 get_install_dir($package, $target, $user_context, $app_context) Returns install destination directory for given L object -- cgit v1.2.1