You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2003/09/10 07:29:44 UTC
[mp2] including CVS on Win32
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).
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 10 Sep 2003, Stas Bekman wrote:
> 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.
Thanks very much, Stas - I'll test those out, and try to
come up with something portable.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> Thanks, Stas - that does work in excluding the CVS/ entries
> from getting into blib:
+1, please commit
> ============================================================
> Index: lib/ModPerl/BuildMM.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
> retrieving revision 1.11
> diff -u -r1.11 BuildMM.pm
> --- lib/ModPerl/BuildMM.pm 21 May 2003 06:47:45 -0000 1.11
> +++ lib/ModPerl/BuildMM.pm 11 Sep 2003 00:38:41 -0000
> @@ -6,6 +6,7 @@
> use ExtUtils::MakeMaker ();
> use Cwd ();
> use File::Spec;
> +use File::Basename;
>
> use Apache::Build ();
> use ModPerl::MM;
> @@ -254,7 +255,7 @@
> }
>
> return '' if $path =~ m/\.(pl|cvsignore)$/;
> - return '' if $path =~ m:\bCVS/:;
> + return '' if (basename dirname $path) eq 'CVS';
> return '' if $path =~ m/~$/;
>
> $path;
>
> =============================================================
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 10 Sep 2003, Stas Bekman wrote:
> 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.
Thanks, Stas - that does work in excluding the CVS/ entries
from getting into blib:
============================================================
Index: lib/ModPerl/BuildMM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
retrieving revision 1.11
diff -u -r1.11 BuildMM.pm
--- lib/ModPerl/BuildMM.pm 21 May 2003 06:47:45 -0000 1.11
+++ lib/ModPerl/BuildMM.pm 11 Sep 2003 00:38:41 -0000
@@ -6,6 +6,7 @@
use ExtUtils::MakeMaker ();
use Cwd ();
use File::Spec;
+use File::Basename;
use Apache::Build ();
use ModPerl::MM;
@@ -254,7 +255,7 @@
}
return '' if $path =~ m/\.(pl|cvsignore)$/;
- return '' if $path =~ m:\bCVS/:;
+ return '' if (basename dirname $path) eq 'CVS';
return '' if $path =~ m/~$/;
$path;
=============================================================
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> 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:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
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 ...
I'll look into this further ...
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Stas Bekman <st...@stason.org>.
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?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
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.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] including CVS on Win32
Posted by Stas Bekman <st...@stason.org>.
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.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org