Unpacker should force mv when extracting module to install dir#1226
Unpacker should force mv when extracting module to install dir#1226dickolsson wants to merge 1 commit intopuppetlabs:masterfrom dickolsson:bug/master/17033-unpacker-force-mv
Conversation
|
@rcoleman agreed to review this in the Redmine ticket; Ryan could you check this out? It looks fine to me. |
|
Let's say you have a custom module named 'apache' in your modulepath and you try to install puppetlabs-apache. Would this patch modify PMT to forcibly overwrite your existing module? |
|
That's a good point. After looking at the code the installer checks elsewhere for installed modules. However the installer also respects a --force method; it seems better to pass the --force method through to the unpacker rather than permanently turn :force on. |
|
I'm going to go ahead and close this pull request for the time being. Please re-open this pull request once the next actions are addressed, new information is available, or you have a question related to this pull request. We've become aware of difficulties re-opening pull requests, in the event you cannot please mention jeffmccune or adrienthebo with an @ sign in front and we'll re-open this pull request. Closing the pull request doesn't mean we don't consider this change valuable, just that there are things that need to be addressed before it can be merged. If you have any questions or concerns, please don't hesitate to ping us in #puppet-dev on irc.freenode.net. |
|
This looks like it could be a Ruby bug: https://www.ruby-forum.com/topic/4409933 |
See https://projects.puppetlabs.com/issues/17033
TL;DR
When the Unpacker tries to extract a module containing a broken symlink to its install dir the
FileUtils::mvcommand fails for some reason. I’m not sure why, because moving a directly with broken symlinks is normally ok. But doing a force move fixes the problem.