Re: [Module::Build] Preserving files' executable bits, once more
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <ml...@th...> - 2006-04-09 04:18:04
|
Julian Mehnle wrote:
> Hi M::B developers,
>
> in October 2004, I reported a bug that M::B wasn't preserving the
> executable bits of files when creating a dist tarball (i.e. with the
> "dist" action).[1] The issue was resolved in M::B 0.27_01 by an addition
> of chmodding code to the Module::Build::Base::ACTION_distdir() method.[2]
>
> Now I'm experiencing a similar problem in a slightly different situation.
> I have essentially the following in Build.PL:
>
> | my $build = $class->new(
> | ...
> | install_path => {
> | ...
> | 'etc-global' => '/etc'
> | },
> | misc_files => {
> | 'misc/foo-bar' => 'etc-global/foo/bar'
> | },
> | ...
> | );
> |
> | $build->add_build_element('misc');
>
> The intent is to install misc/foo-bar to /etc/foo/bar (with /etc/foo/
> belonging to another package and bar being a hook script), which basically
> works ok. misc/foo-bar has the executable bit set, however when the file
> is copied to blib/etc-global/foo/bar, the x bit gets lost.
>
> Is that by design? If not, I hope this can be fixed before the release of
> 0.28.
Borrowing code from ExtUtils::Install::install() and ::pm_to_blib(), the
copy_if_modified() method now preserves file mode and timestamps. This
is the method used throughout MB to copy files, so behavior should now
be consistent throughout.
Randy.
|