aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo De Nardin <spuk@mandriva.org>2007-05-08 05:45:49 +0000
committerGustavo De Nardin <spuk@mandriva.org>2007-05-08 05:45:49 +0000
commit86e8b848796998fd360fd171efe5c569f629714c (patch)
tree752b5e21ebcb4586b8531efea18b11a5dcd5c464
parent54ac05ac9906926bbc5f2c3d047e0d2073f7fc4e (diff)
downloadmga-youri-core-86e8b848796998fd360fd171efe5c569f629714c.tar
mga-youri-core-86e8b848796998fd360fd171efe5c569f629714c.tar.gz
mga-youri-core-86e8b848796998fd360fd171efe5c569f629714c.tar.bz2
mga-youri-core-86e8b848796998fd360fd171efe5c569f629714c.tar.xz
mga-youri-core-86e8b848796998fd360fd171efe5c569f629714c.zip
restoring file state as of the Big SVN Breakage
-rw-r--r--lib/Youri/Repository.pm28
1 files 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<Youri::Package> object