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

Git package is always installed by default #7

Closed
ChrisLundquist opened this Issue Jan 5, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ChrisLundquist

ChrisLundquist commented Jan 5, 2013

Earlier in the same run the git::source recipe ran ( I needed 1.8.0 + which wasn't available via yum )

       [2013-01-04T23:50:16+00:00] INFO: remote_file[/tmp/vagrant-chef-1/git-1.8.0.2.tar.gz] updated
       [2013-01-04T23:50:16+00:00] INFO: remote_file[/tmp/vagrant-chef-1/git-1.8.0.2.tar.gz] mode changed to 644
       [2013-01-04T23:50:16+00:00] INFO: Processing execute[Extracting and Building Git 1.8.0.2 from Source] action run (git::source line 40)
       [2013-01-04T23:51:15+00:00] INFO: execute[Extracting and Building Git 1.8.0.2 from Source] ran successfully

Later the package was installed via yum. Git should be in the path at this point.

       [2013-01-04T23:52:53+00:00] INFO: Processing package[curl] action install (ruby_build::default line 34)
       [2013-01-04T23:52:53+00:00] INFO: Processing package[git] action install (ruby_build::default line 34)
       [2013-01-04T23:52:53+00:00] INFO: package[git] installing git-1.7.1-2.el6_0.1 from base repository
       [2013-01-04T23:53:00+00:00] INFO: Processing execute[Install ruby-build] action nothing (ruby_build::default line 38)
       [2013-01-04T23:53:00+00:00] INFO: Processing directory[/tmp/vagrant-chef-1] action create (ruby_build::default line 48)

Here we see both installs of git

[vagrant@web-centos6 ~]$ ls -la /usr/bin/git
-rwxr-xr-x 105 root root 1138048 Jun 25  2011 /usr/bin/git
[vagrant@web-centos6 ~]$  /usr/bin/git --version
git version 1.7.1
[vagrant@web-centos6 ~]$ which git
/usr/local/bin/git
[vagrant@web-centos6 ~]$ git --version
git version 1.8.0
@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Jan 5, 2013

what would be better?

Something like

package "git" do
  not_if "command -v git" # It may have been installed by source
end

or depending on the opscode recipe?

maybe

include_recipe "git"

or we could search the run list for a "git" cookbook and not install it if we find it?

ChrisLundquist commented Jan 5, 2013

what would be better?

Something like

package "git" do
  not_if "command -v git" # It may have been installed by source
end

or depending on the opscode recipe?

maybe

include_recipe "git"

or we could search the run list for a "git" cookbook and not install it if we find it?

@fnichol fnichol closed this in d2d8e21 May 23, 2013

@fnichol

This comment has been minimized.

Show comment
Hide comment
@fnichol

fnichol May 23, 2013

Collaborator

This should get the job done!

Collaborator

fnichol commented May 23, 2013

This should get the job done!

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018

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