Skip to content
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

"rehash-rbenv $user" is always executed #12

Closed
teleservices opened this issue Jul 8, 2012 · 6 comments
Closed

"rehash-rbenv $user" is always executed #12

teleservices opened this issue Jul 8, 2012 · 6 comments

Comments

@teleservices
Copy link

I am not sure if this is an issue or not. My limited understanding has led me to think that nothing should be executed if the machine is up to date...

I am calling the rbenv module in this manner:

class { rbenv:
  user => 'vagrant',
  compile => true,
  version => '1.9.3-p194',
}

When I run puppet apply --verbose --modulepath modules manifests/site.pp I see the following:

notice: /Stage[main]/Rbenv/Rbenv::Compile[rbenv::compile::vagrant::1.9.3-p194]/Exec[rehash-rbenv vagrant]/returns: executed successfully

If this is intentional, my apologies.

@alup
Copy link
Owner

alup commented Jul 8, 2012

You are right, this is an issue ... The problem is that currently, I can't think of a way to check that rehash has already been called. Maybe, we should skip this action.

@teleservices
Copy link
Author

I understand the quandary. If there were a way to detect the need for
rehash, there would probably not be a rehash function ;-)

Though I have not verified this, I think that the installation process
includes an initial rehash after a ruby has been installed. At least
it is implied in the docs. So perhaps an explicit rehash is not
needed? Also, I assume anyone using rbenv is well aware of the need
to rehash after creating/installing any binaries, So, perhaps
skipping an explicit rehash is OK?

I can live with this as is for now, as the convenience of your module
far outweighs this issue. However, I hope you agree with me that an up
to date system should generate no actions.

On Sun, Jul 8, 2012 at 1:14 PM, Andreas Loupasakis
reply@reply.github.com
wrote:

You are right, this is an issue ... The problem is that currently, I can't think of a way to check that rehash has already been called. Maybe, we should skip this action.


Reply to this email directly or view it on GitHub:
#12 (comment)

@fgrehm
Copy link
Contributor

fgrehm commented Aug 14, 2012

Couldn't this be solved by using Puppet's notify + refreshonly? I'll give a shot at it later on tonight

@fgrehm
Copy link
Contributor

fgrehm commented Aug 15, 2012

Well, it seems that this is not happening anymore, @teleservices would you be able to double check up there with the most recent version?

@vjt
Copy link
Contributor

vjt commented Aug 16, 2012

I confirm - this fix was introduced during the refactor, and now a temporary "semaphore" lockfile is used to avoid re-executing rehash every time.

The relevant commit is here.

@alup
Copy link
Owner

alup commented Aug 17, 2012

Nice, so this can be closed.

@alup alup closed this as completed Aug 17, 2012
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

No branches or pull requests

4 participants