On Tue, 9 Sep 2003, Stas Bekman wrote:
Randy Kobes wrote:
On Tue, 9 Sep 2003, Stas Bekman wrote:
Randy Kobes wrote:
Hi, In building the cvs mp2, Win32 picks up some CVS directories in, eg, glue_pod. This diff: ===================================================== Index: BuildMM.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v retrieving revision 1.11 diff -u -r1.11 BuildMM.pm --- BuildMM.pm 21 May 2003 06:47:45 -0000 1.11 +++ BuildMM.pm 10 Sep 2003 05:24:50 -0000 @@ -254,7 +254,7 @@ }
return '' if $path =~ m/\.(pl|cvsignore)$/; - return '' if $path =~ m:\bCVS/:; + return '' if ($path =~ m:\bCVS: and -d $path); return '' if $path =~ m/~$/;
$path; ========================================================= excludes them (I guess the problem on Win32 is that the trailing '/' isn't included for directories).
Randy, I don't understand what it has to do with 'glue_pods', which is just a file.
Sorry, that should have been the 'glue_pod' of ModPerl::BuildMM - what happens on Win32 is that some CVS directories get included and then copied over into blib/ when building.
i still don't get what it has to do with ModPerl::BuildMM::glue_pod, but I also think that the pattern m:\bCVS/: is not for catching /path/to/CVS but /path/to/CVS/Entries, otherwise it would have $: at the end of the pattern, no? so your fix will miss /path/to/CVS/Entries. If the pattern was wrong in first place, it should probably be: m:\bCVS(/|$):;
can you show the relevant chunk of Makefile, where the CVS entries sneak in?
I'm probably misunderstanding where the CVS entries are coming from ... With the current ModPerl::BuildMM, the CVS/* files get copied into blib/, coming from entries in the top-level Makefile like
TO_INST_PM = lib/APR/CVS/Entries \ lib/APR/CVS/Repository \ lib/APR/CVS/Root \ etc. and PM_TO_BLIB = ... lib/CVS/Root \ blib\lib\CVS\Root \ lib/Apache/CVS/Repository \ blib\lib\Apache\CVS\Repository \ etc., and pm_to_blib: $(TO_INST_PM) ... lib/CVS/Root blib\lib\CVS\Root and then glue_pods: $(FULLPERL) ... -MModPerl::BuildMM -e ModPerl::BuildMM::glue_pod lib/CVS/Root ...
Understood. Yes, but glue_pods just uses the data from the libscan. libscan certainly shouldn't pick those. I can't reproduce this on linux, but we probably need a more portable pattern which you tried to provide, however I think it's not the right fix. What we want to skip is m|CVS/[^/]+$/, but it won't work on systems with a different slash. So File::Spec comes to help:
return '' if File::Spec->splitdir( $path )[-2] eq 'CVS';
or something like that. however File::Spec::Unix talks about $path being a path, without a volume, which I have no idea if it's true. So may be a better solution is:
use File::Basename; return '' (basename dirname $path) eq 'CVS';
This is untested, but the point is that using portable tools sounds like a better idea than trying to craft the regex.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
