Skip Menu |

This queue is for tickets about the File-Sharedir-Install CPAN distribution.

Report information
The Basics
Id: 95749
Status: resolved
Priority: 0/
Queue: File-Sharedir-Install

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
ether [...] cpan.org
KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.08
  • 0.09
Fixed in: 0.10



Subject: Dotfiles outside share root excluded from being installed

_scan_share_dir gets passed a structure to  $_[4] to control dot-dir inclusion:


sub _scan_share_dir
{
    my( $files, $idir, $dir, $def ) = @_;
   ...
   next if not $def->{dotfiles}
 

 

However, in the recursive step, this structure is not passed:

          _scan_share_dir( $files, File::Spec->catdir( $idir, $entry ), $full );


Which means that on subsequent calls "$def" is undefined, regardless of user configuration.
 

This leads to dotfiles in any path other than the top level getting ignored.

Attached is output from instrumented run showing decision making and availabilty of $def in the currrent logic on CPAN ( pre_instrument.txt )
 

And also attached is the output after modifying

          _scan_share_dir( $files, File::Spec->catdir( $idir, $entry ), $full );

to read

          _scan_share_dir( $files, File::Spec->catdir( $idir, $entry ), $full , $def );

( post_instrument.txt )

And the difference ( instrument_difference.txt ) shows the desired effect.

( Makefile.PL in question is https://metacpan.org/source/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.013004/Makefile.PL which is using the interface as documented, but alas, does not install *any* dotfiles with the current CPAN release )

Subject: instrument_diff.txt
--- pre_instrument.txt 2014-05-18 19:24:27.088248481 +1200 +++ post_instrument.txt 2014-05-18 19:24:53.074264403 +1200 @@ -1,22 +1,23 @@ def is defined ?? share/profiles/moo-role -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo-role/profile.ini -> file included ?? share/profiles/moo-role/skel -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo-role/skel/Changes -> file included ?? share/profiles/moo-role/skel/maint -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo-role/skel/maint/.. ?? share/profiles/moo-role/skel/maint/. ?? share/profiles/moo-role/skel/.gitignore + -> file included ?? share/profiles/moo-role/skel/.. ?? share/profiles/moo-role/skel/perlcritic.rc -> file included @@ -24,6 +25,7 @@ -> file included ?? share/profiles/moo-role/skel/. ?? share/profiles/moo-role/skel/.perltidyrc + -> file included ?? share/profiles/moo-role/skel/weaver.ini -> file included ?? share/profiles/moo-role/.. @@ -32,22 +34,23 @@ -> file included ?? share/profiles/moose-role -> enterdir -def is NOT defined +def is defined ?? share/profiles/moose-role/profile.ini -> file included ?? share/profiles/moose-role/skel -> enterdir -def is NOT defined +def is defined ?? share/profiles/moose-role/skel/Changes -> file included ?? share/profiles/moose-role/skel/maint -> enterdir -def is NOT defined +def is defined ?? share/profiles/moose-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moose-role/skel/maint/.. ?? share/profiles/moose-role/skel/maint/. ?? share/profiles/moose-role/skel/.gitignore + -> file included ?? share/profiles/moose-role/skel/.. ?? share/profiles/moose-role/skel/perlcritic.rc -> file included @@ -55,6 +58,7 @@ -> file included ?? share/profiles/moose-role/skel/. ?? share/profiles/moose-role/skel/.perltidyrc + -> file included ?? share/profiles/moose-role/skel/weaver.ini -> file included ?? share/profiles/moose-role/.. @@ -63,22 +67,23 @@ -> file included ?? share/profiles/default -> enterdir -def is NOT defined +def is defined ?? share/profiles/default/profile.ini -> file included ?? share/profiles/default/skel -> enterdir -def is NOT defined +def is defined ?? share/profiles/default/skel/Changes -> file included ?? share/profiles/default/skel/maint -> enterdir -def is NOT defined +def is defined ?? share/profiles/default/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/default/skel/maint/.. ?? share/profiles/default/skel/maint/. ?? share/profiles/default/skel/.gitignore + -> file included ?? share/profiles/default/skel/.. ?? share/profiles/default/skel/perlcritic.rc -> file included @@ -86,6 +91,7 @@ -> file included ?? share/profiles/default/skel/. ?? share/profiles/default/skel/.perltidyrc + -> file included ?? share/profiles/default/skel/weaver.ini -> file included ?? share/profiles/default/.. @@ -96,22 +102,23 @@ ?? share/profiles/. ?? share/profiles/moo -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo/profile.ini -> file included ?? share/profiles/moo/skel -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo/skel/Changes -> file included ?? share/profiles/moo/skel/maint -> enterdir -def is NOT defined +def is defined ?? share/profiles/moo/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo/skel/maint/.. ?? share/profiles/moo/skel/maint/. ?? share/profiles/moo/skel/.gitignore + -> file included ?? share/profiles/moo/skel/.. ?? share/profiles/moo/skel/perlcritic.rc -> file included @@ -119,6 +126,7 @@ -> file included ?? share/profiles/moo/skel/. ?? share/profiles/moo/skel/.perltidyrc + -> file included ?? share/profiles/moo/skel/weaver.ini -> file included ?? share/profiles/moo/..
Subject: post_instrument.txt
def is defined ?? share/profiles/moo-role -> enterdir def is defined ?? share/profiles/moo-role/profile.ini -> file included ?? share/profiles/moo-role/skel -> enterdir def is defined ?? share/profiles/moo-role/skel/Changes -> file included ?? share/profiles/moo-role/skel/maint -> enterdir def is defined ?? share/profiles/moo-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo-role/skel/maint/.. ?? share/profiles/moo-role/skel/maint/. ?? share/profiles/moo-role/skel/.gitignore -> file included ?? share/profiles/moo-role/skel/.. ?? share/profiles/moo-role/skel/perlcritic.rc -> file included ?? share/profiles/moo-role/skel/perlcritic.deps -> file included ?? share/profiles/moo-role/skel/. ?? share/profiles/moo-role/skel/.perltidyrc -> file included ?? share/profiles/moo-role/skel/weaver.ini -> file included ?? share/profiles/moo-role/.. ?? share/profiles/moo-role/. ?? share/profiles/moo-role/ModuleTemplate.pm.tpl -> file included ?? share/profiles/moose-role -> enterdir def is defined ?? share/profiles/moose-role/profile.ini -> file included ?? share/profiles/moose-role/skel -> enterdir def is defined ?? share/profiles/moose-role/skel/Changes -> file included ?? share/profiles/moose-role/skel/maint -> enterdir def is defined ?? share/profiles/moose-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moose-role/skel/maint/.. ?? share/profiles/moose-role/skel/maint/. ?? share/profiles/moose-role/skel/.gitignore -> file included ?? share/profiles/moose-role/skel/.. ?? share/profiles/moose-role/skel/perlcritic.rc -> file included ?? share/profiles/moose-role/skel/perlcritic.deps -> file included ?? share/profiles/moose-role/skel/. ?? share/profiles/moose-role/skel/.perltidyrc -> file included ?? share/profiles/moose-role/skel/weaver.ini -> file included ?? share/profiles/moose-role/.. ?? share/profiles/moose-role/. ?? share/profiles/moose-role/ModuleTemplate.pm.tpl -> file included ?? share/profiles/default -> enterdir def is defined ?? share/profiles/default/profile.ini -> file included ?? share/profiles/default/skel -> enterdir def is defined ?? share/profiles/default/skel/Changes -> file included ?? share/profiles/default/skel/maint -> enterdir def is defined ?? share/profiles/default/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/default/skel/maint/.. ?? share/profiles/default/skel/maint/. ?? share/profiles/default/skel/.gitignore -> file included ?? share/profiles/default/skel/.. ?? share/profiles/default/skel/perlcritic.rc -> file included ?? share/profiles/default/skel/perlcritic.deps -> file included ?? share/profiles/default/skel/. ?? share/profiles/default/skel/.perltidyrc -> file included ?? share/profiles/default/skel/weaver.ini -> file included ?? share/profiles/default/.. ?? share/profiles/default/. ?? share/profiles/default/ModuleTemplate.pm.tpl -> file included ?? share/profiles/.. ?? share/profiles/. ?? share/profiles/moo -> enterdir def is defined ?? share/profiles/moo/profile.ini -> file included ?? share/profiles/moo/skel -> enterdir def is defined ?? share/profiles/moo/skel/Changes -> file included ?? share/profiles/moo/skel/maint -> enterdir def is defined ?? share/profiles/moo/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo/skel/maint/.. ?? share/profiles/moo/skel/maint/. ?? share/profiles/moo/skel/.gitignore -> file included ?? share/profiles/moo/skel/.. ?? share/profiles/moo/skel/perlcritic.rc -> file included ?? share/profiles/moo/skel/perlcritic.deps -> file included ?? share/profiles/moo/skel/. ?? share/profiles/moo/skel/.perltidyrc -> file included ?? share/profiles/moo/skel/weaver.ini -> file included ?? share/profiles/moo/.. ?? share/profiles/moo/. ?? share/profiles/moo/ModuleTemplate.pm.tpl -> file included Generating a Unix-style Makefile Writing Makefile for Dist::Zilla::PluginBundle::Author::KENTNL Writing MYMETA.yml and MYMETA.json
Subject: pre_instrument.txt
def is defined ?? share/profiles/moo-role -> enterdir def is NOT defined ?? share/profiles/moo-role/profile.ini -> file included ?? share/profiles/moo-role/skel -> enterdir def is NOT defined ?? share/profiles/moo-role/skel/Changes -> file included ?? share/profiles/moo-role/skel/maint -> enterdir def is NOT defined ?? share/profiles/moo-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo-role/skel/maint/.. ?? share/profiles/moo-role/skel/maint/. ?? share/profiles/moo-role/skel/.gitignore ?? share/profiles/moo-role/skel/.. ?? share/profiles/moo-role/skel/perlcritic.rc -> file included ?? share/profiles/moo-role/skel/perlcritic.deps -> file included ?? share/profiles/moo-role/skel/. ?? share/profiles/moo-role/skel/.perltidyrc ?? share/profiles/moo-role/skel/weaver.ini -> file included ?? share/profiles/moo-role/.. ?? share/profiles/moo-role/. ?? share/profiles/moo-role/ModuleTemplate.pm.tpl -> file included ?? share/profiles/moose-role -> enterdir def is NOT defined ?? share/profiles/moose-role/profile.ini -> file included ?? share/profiles/moose-role/skel -> enterdir def is NOT defined ?? share/profiles/moose-role/skel/Changes -> file included ?? share/profiles/moose-role/skel/maint -> enterdir def is NOT defined ?? share/profiles/moose-role/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moose-role/skel/maint/.. ?? share/profiles/moose-role/skel/maint/. ?? share/profiles/moose-role/skel/.gitignore ?? share/profiles/moose-role/skel/.. ?? share/profiles/moose-role/skel/perlcritic.rc -> file included ?? share/profiles/moose-role/skel/perlcritic.deps -> file included ?? share/profiles/moose-role/skel/. ?? share/profiles/moose-role/skel/.perltidyrc ?? share/profiles/moose-role/skel/weaver.ini -> file included ?? share/profiles/moose-role/.. ?? share/profiles/moose-role/. ?? share/profiles/moose-role/ModuleTemplate.pm.tpl -> file included ?? share/profiles/default -> enterdir def is NOT defined ?? share/profiles/default/profile.ini -> file included ?? share/profiles/default/skel -> enterdir def is NOT defined ?? share/profiles/default/skel/Changes -> file included ?? share/profiles/default/skel/maint -> enterdir def is NOT defined ?? share/profiles/default/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/default/skel/maint/.. ?? share/profiles/default/skel/maint/. ?? share/profiles/default/skel/.gitignore ?? share/profiles/default/skel/.. ?? share/profiles/default/skel/perlcritic.rc -> file included ?? share/profiles/default/skel/perlcritic.deps -> file included ?? share/profiles/default/skel/. ?? share/profiles/default/skel/.perltidyrc ?? share/profiles/default/skel/weaver.ini -> file included ?? share/profiles/default/.. ?? share/profiles/default/. ?? share/profiles/default/ModuleTemplate.pm.tpl -> file included ?? share/profiles/.. ?? share/profiles/. ?? share/profiles/moo -> enterdir def is NOT defined ?? share/profiles/moo/profile.ini -> file included ?? share/profiles/moo/skel -> enterdir def is NOT defined ?? share/profiles/moo/skel/Changes -> file included ?? share/profiles/moo/skel/maint -> enterdir def is NOT defined ?? share/profiles/moo/skel/maint/perlcritic.rc.gen.pl -> file included ?? share/profiles/moo/skel/maint/.. ?? share/profiles/moo/skel/maint/. ?? share/profiles/moo/skel/.gitignore ?? share/profiles/moo/skel/.. ?? share/profiles/moo/skel/perlcritic.rc -> file included ?? share/profiles/moo/skel/perlcritic.deps -> file included ?? share/profiles/moo/skel/. ?? share/profiles/moo/skel/.perltidyrc ?? share/profiles/moo/skel/weaver.ini -> file included ?? share/profiles/moo/.. ?? share/profiles/moo/. ?? share/profiles/moo/ModuleTemplate.pm.tpl -> file included Generating a Unix-style Makefile Writing Makefile for Dist::Zilla::PluginBundle::Author::KENTNL Writing MYMETA.yml and MYMETA.json

Attached is a simple straight foward patch to apply to current 0.09.

The only reason I didn't submit a patch sooner:

- there's no repostiory indicators anywhere, and its often a case that patching against published sources is patching the wrong code, or patching outdated code which leads to a merge collision
- 5 characters makes this problem go away.

If there's anything else I can do to expedient this patch, please let me know, because I hit this headache every time I install a fresh perl ( which is fairly frequently ), and I don't realise its broken till I'm working on some new tool in git and seeing a bunch of bogus files in git that shouldn't be there because my ".gitignore" template didn't get installed.

https://metacpan.org/source/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.020000/share/profiles/default/skel

Subject: patch
Download patch
application/octet-stream 430b

Message body not shown because it is not plain text.

Hi, What would it take to get this patch applied/shipped? I wonder if perhaps this dist should be maintained by the Perl Toolchain Gang, since it is used quite extensively and relied upon to be correct?
Le Mar 09 Déc 2014 16:46:35, ETHER a écrit : Show quoted text
> Hi, > What would it take to get this patch applied/shipped?
It would take me geting my thumbs out of my [edited] and doing it. 0.10 has just been uploaded and includes this patch. Show quoted text
> I wonder if perhaps this dist should be maintained by the Perl > Toolchain Gang, since it is used quite extensively and relied upon to > be correct?
I will gladly hand over maintenance of this dist to someone else. I wrote it because I thought my HTTP::Browscap would use it at one point. It doesn't. I don't use it. I'm also (as you can easily see) the most diligent of maintainers. The majority of my work seems to have shifted from being a programer to being a sysadmin.
On 2014-12-10 11:11:53, GWYN wrote: Show quoted text
> It would take me geting my thumbs out of my [edited] and doing it. > 0.10 has just been uploaded and includes this patch.
Awesome, thank you! Show quoted text
> > I wonder if perhaps this dist should be maintained by the Perl > > Toolchain Gang, since it is used quite extensively and relied upon to > > be correct?
> > I will gladly hand over maintenance of this dist to someone else. I > wrote it because I thought my HTTP::Browscap would use it at one > point. It doesn't. I don't use it. I'm also (as you can easily see) > the most diligent of maintainers. The majority of my work seems to > have shifted from being a programer to being a sysadmin.
Let me be the first to respond and say "yes please"! My PAUSE id is 'ETHER'; if you're comfortable adding me as 'first-come', then I can take care of handing out additional permissions without bothering you. The place to do that is at https://pause.perl.org/pause/authenquery?ACTION=share_perms -- you can add people as maintainers, or hand off primary privileges to someone else there.
Le Ven 12 Déc 2014 13:48:07, ETHER a écrit : Show quoted text
> Let me be the first to respond and say "yes please"! My PAUSE id is > 'ETHER'; if you're comfortable adding me as 'first-come'
The PAUSE interface is ... non-obvious. I think I've added you as co-maint. I don't see any mention of first-come on https://pause.perl.org/pause/authenquery?ACTION=share_perms though maybe 2.1 is what we want?
On 2014-12-12 13:15:01, GWYN wrote: Show quoted text
> Le Ven 12 Déc 2014 13:48:07, ETHER a écrit : >
> > Let me be the first to respond and say "yes please"! My PAUSE id is > > 'ETHER'; if you're comfortable adding me as 'first-come'
> > The PAUSE interface is ... non-obvious. I think I've added you as co- > maint. I don't see any mention of first-come on > https://pause.perl.org/pause/authenquery?ACTION=share_perms though > maybe 2.1 is what we want?
Right, 2.1 "Transfer primary maintainership status to somebody else (you become co-maintainer)" was what I was thinking of.
ETHER and REHSACK now have co-maint. I never knew this module was so popular. I'm working on the principal that you are all in good faith and that multiple maintainers isn't going to lead to in-fighting.
CC: KENTNL [...] cpan.org, dolmen [...] cpan.org, ether [...] cpan.org
Subject: Re: [rt.cpan.org #95749] [PATCH] Dotfiles outside share root excluded from being installed
Date: Sat, 13 Dec 2014 23:09:43 -0800
To: bug-File-Sharedir-Install [...] rt.cpan.org
From: Karen Etheridge <karen [...] froods.org>
Super, thanks! I think we'll be sensible about big decisions :) Is there a code repository available anywhere, e.g. so I can copy the change history into a github repository? On Sat, Dec 13, 2014 at 5:27 PM, Philip Gwyn via RT < bug-File-Sharedir-Install@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=95749 > > > ETHER and REHSACK now have co-maint. > > I never knew this module was so popular. > > I'm working on the principal that you are all in good faith and that > multiple maintainers isn't going to lead to in-fighting. >
Le Dim 14 Déc 2014 02:09:52, karen@froods.org a écrit : Show quoted text
> Super, thanks! I think we'll be sensible about big decisions :) > > Is there a code repository available anywhere, e.g. so I can copy the > change history into a github repository?
It is on a private SVN repo that also contains stuff I don't want published. Can one pull usefully pull out all changes from just one dir in an SVN repo?
RT-Send-CC: karen [...] froods.org
Le Dim 14 Déc 2014 02:09:52, karen@froods.org a écrit : Show quoted text
> Is there a code repository available anywhere, e.g. so I can copy the > change history into a github repository?
Here's the output of svnadmin dump | svndumpfilter | gzip -9c > File-Sharedir-Install-no-empty.gz You will see that I initially put the project in the wrong sub-directory and then had to move it into the correct directory. Yes, I'm a bad release engineer.
Subject: File-Sharedir-Install-no-empty.gz

Message body not shown because it is not plain text.