Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla CPAN distribution.

Report information
The Basics
Id: 64383
Status: stalled
Priority: 0/
Queue: Dist-Zilla

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

Bug Information
Severity: Important
Broken in: 4.200000
Fixed in: (no value)



Subject: PruneCruft has ambiguous 'except' handling leading to files being included from build-dir
If PruneCruft has an except rule like so


[PruneCruft]
except= \.foo$

once Dist-Name-* is populated the first time, the structure looks like so: 

baz/bar/.foo
Dist-Name-Version/baz/bar/.foo

and  subsequent calls to build result in
baz/bar/.foo
Dist-Name-Version/baz/bar/.foo
Dist-Name-Version/Dist-Name-Version/baz/bar/.foo

This makes sense when you understand how it works internally, but its unintuitive.

  return 0 if $self->_dont_exclude_file($file);
  return 1 if index($file->name, $self->zilla->name . '-') == 0;

So, the rule to include it overwrites the rule to exclude it. 

Thats fine, but I'm not thinking about stuff in Dist-Name-Version, the first time I call build it doesn't even exist.


  return 1 if index($file->name, $self->zilla->name . '-') == 0;
  return 0 if $self->_dont_exclude_file($file);

is more what I expected. 

This quirk should probably be documented, or perhaps changed. 

I'm contemplating a PruneCruft::BuildDir which is uninterruptable by prunecruft exclusion rules. 


A patch to make exceptions not apply to the build dir portion of PruneCruft would be welcome, as long as it includes tests. -- rjbs