Hi, anyone know if this was ever fixed?
today, I installed the latest version of vcsrepo from puppet forge. and
still seeing this issue with git clone. I noticed this post is from 3 years
ago so bit surprised that this isn't fixed.
I have narrowed it down to def working_copy_exists?
the checks here always returns false. even if the repo clone exists. I made
slight modification as below and it seem to work for me. Not entirely sure
why File.readlines doesn't work.
*diff --git
a/PuppetForge/puppetlabs-vcsrepo/lib/puppet/provider/vcsrepo/git.rb
b/PuppetForge/puppetlabs-vcsrepo/lib/puppet/provider/vcsrepo/git.rb*
*index bf11f3d..2e54125 100644*
*--- a/PuppetForge/puppetlabs-vcsrepo/lib/puppet/provider/vcsrepo/git.rb*
*+++ b/PuppetForge/puppetlabs-vcsrepo/lib/puppet/provider/vcsrepo/git.rb*
@@ -103,7 +103,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent =>
Puppet::Provider::Vcsrepo)
def working_copy_exists?
if @resource.value(:source) and
File.exists?(File.join(@resource.value(:path), '.git', 'config'))
- File.readlines(File.join(@resource.value(:path), '.git',
'config')).grep(/#{default_url}/).any?
+ File.open(File.join(@resource.value(:path), '.git',
'config')).any?{|line| line.include?(default_url)}
else
File.directory?(File.join(@resource.value(:path), '.git'))
end
puppet version: 3.6.2
ruby 1.8.7
rhel 6.5
Any thoughts?
On Tuesday, 20 November 2012 20:26:54 UTC, Ryan Coleman wrote:
>
>
>
>
> On Mon, Nov 19, 2012 at 4:01 AM, bowlby <[email protected] <javascript:>>
> wrote:
>
>> Hi,
>> I'm running into a problem using the puppetlabs provided vcsrepo-module.
>> It keeps giving the same error:
>>
>> --------------
>> notice: /Stage[main]//Vcsrepo[/usr/share/test2]/ensure: Creating
>> repository from latest
>> err: /Stage[main]//Vcsrepo[/usr/share/test2]/ensure: change from absent
>> to latest failed: Could not create repository (non-repository at path)
>>
>
> Does /usr/share/test2 already exist prior to the Vcsrepo resource being
> enforced on your system?
>
> I can't find the appropriate bug against vcsrepo right now (
> https://projects.puppetlabs.com/projects/modules/issues?query_id=185) but
> I suspect that this problem stems from a bug where vcsrepo wants to be the
> one to create the test2 directory and cannot.
>
> If this turns out to be your problem, I'll find/create a bug report on it
> and send it your way. Sorry for the inconvenience.
>
> --Ryan
>
>
>
>> --------------
>>
>> This is in my vcs.pp and when I run, puppet apply ./vcs.pp
>> I keep getting the error below. When I run git clone as the user it runs
>> fine.
>> Anybody any suggestions?
>>
>> --------------
>> Exec { path => "/bin:/usr/bin:/sbin:/usr/sbin", }
>>
>> vcsrepo { '/usr/share/test2':
>> ensure => latest,
>> provider => git,
>> revision => 'master',
>> path => '/usr/share/test2',
>> user => "user",
>> source => 'git://
>> github.com/puppetlabs/puppetlabs-vcsrepo.git'
>> }
>> -
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/puppet-users/-/Oa4SscXpWJ0J.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/b73c7687-007a-42ea-9299-7c1687814bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.