Skip to content

Unpacker should force mv when extracting module to install dir#1226

Closed
dickolsson wants to merge 1 commit intopuppetlabs:masterfrom
dickolsson:bug/master/17033-unpacker-force-mv
Closed

Unpacker should force mv when extracting module to install dir#1226
dickolsson wants to merge 1 commit intopuppetlabs:masterfrom
dickolsson:bug/master/17033-unpacker-force-mv

Conversation

@dickolsson
Copy link

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::mv command 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.

@adrienthebo
Copy link
Contributor

@rcoleman agreed to review this in the Redmine ticket; Ryan could you check this out? It looks fine to me.

@ryanycoleman
Copy link

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?

@adrienthebo
Copy link
Contributor

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.

@adrienthebo
Copy link
Contributor

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.

@blalor
Copy link

blalor commented Sep 11, 2013

This looks like it could be a Ruby bug: https://www.ruby-forum.com/topic/4409933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants