-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with manicopy linking files instead of copying them when making distdir #38
Comments
You can pass MakeMaker the option |
Thank you. I saw that. I think the default option should be I do not even understand why linking to files rather than plain copy. |
That could make sense, but I'm not sure it's really worth it for such a niche thing. |
That's one perspective. Another is the risk-impact, i.e. the damage this has the potential of doing. But, I can understand if it is difficult to code this consideration. |
Patches welcome? |
Sure. Please find below my proposal. However, please note that I am not familiar with the code of this distribution, so there may need more adjustments.
|
Pretty sure that won't work, because PREOP is an argument to I'm not sure that providing a PREOP option is really a useful signal for if the files in the dist dir are going to be modified. Most users use it to generate a README file. I can't tell what your use case is because you don't ship your cleanup script nor have it in your repositories. You could also have your script modify the files by generating new files and renaming them over the existing files, rather than editing them in place. |
I just copied what was in the original module...
But why would I go to such trouble, when the advertised |
When executing the Makefile command
make distdir
, this calls the commandcreate_distdir
which uses ExtUtils::Manifestmanicopy
. It goes on to create a distribution directory, and for some obscure reason, the module files within this distribution directory seem linked to their originals. Indeed, when modifying the copied module, it also modifies the original one. Reverting the change made in the original also modifies the copy! It is as if the copy was not copied but hard linked to the original.I doubt this should be the intended outcome if the
PREOP
option is set, because the procedure would modify both files.To replicate the bug, take a perl distribution, open its main module in an IDE, then type
perl Makefile.PL && make distdir
, then edit the equivalent copied module file, and make some changes (e.g. change the version number), and you will see the same change also occurring in the original file.Update:
This is not related to MacOS and is actually more related to ExtUtils::MakeMaker that calls ExtUtils::Manifest.
The text was updated successfully, but these errors were encountered: