Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

inst/files.pl copy_files() filter

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


adrian at gt

Mar 8, 2011, 1:23 PM

Post #1 of 2 (706 views)
Permalink
inst/files.pl copy_files() filter

Hi,

Just ran into this installing a cloned install. inst/files.pl has:

sub copy_files {
my $root = shift;
my $link = shift;
my $mode = shift || 0444;
return if /\.$/;
return if /.svn/;
return if $UPGRADE and m!/data/!; # Don't upgrade data files.

which doesn't look right and causes the install to fail when after it
skips a directory that ends in a '.'. I don't think File::Find::find
even returns '.' unless you give it '.' as the path to search.

The .svn check can probably go since Bricolage doesn't use svn anymore.

Lastly, the /data/ regex should be a little more specific since you
could end up skipping any other 'data' directories you might have. I'm
guessing it's only meant to filter out bricolage/data and
bricolage/comp/data?

Adrian


david at kineticode

Mar 9, 2011, 9:50 AM

Post #2 of 2 (629 views)
Permalink
Re: inst/files.pl copy_files() filter [In reply to]

On Mar 8, 2011, at 1:23 PM, Adrian Yee wrote:

> Hi,
>
> Just ran into this installing a cloned install. inst/files.pl has:
>
> sub copy_files {
> my $root = shift;
> my $link = shift;
> my $mode = shift || 0444;
> return if /\.$/;
> return if /.svn/;
> return if $UPGRADE and m!/data/!; # Don't upgrade data files.
>
> which doesn't look right and causes the install to fail when after it skips a directory that ends in a '.'. I don't think File::Find::find even returns '.' unless you give it '.' as the path to search.

I'm pretty sure it does. Should be changed to check /^[.]{1,2}$/.

> The .svn check can probably go since Bricolage doesn't use svn anymore.

Should be changed to /^[.]git[^.]*$/

> Lastly, the /data/ regex should be a little more specific since you could end up skipping any other 'data' directories you might have. I'm guessing it's only meant to filter out bricolage/data and bricolage/comp/data?

Yes.

Best,

David

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.