vcsrepo type, svn, & ensure => latest

42 views
Skip to first unread message

Michael Knox

unread,
Jul 16, 2010, 2:11:56 AM7/16/10
to puppe...@googlegroups.com
Following on from a discussion I started on puppet-users regarding the
puppet-vcsrepo module.
(https://groups.google.com/group/puppet-users/browse_thread/thread/954f3bb356e9a468?hl=en)


Attached is a diff to address 2 issues I encountered with the
puppet-vcsrepo type and svn provider.
1. When using ensure => latest, checkout didn't get updated when the
repo was updated.
2. Dependent resources (subscribe etc) always got refreshed even if the
checkout hadn't changed.

This diff addresses both of those issues, I haven't tested with a
provider other than svn.

Code is also at GitHub
http://github.com/mikeknox/puppet-vcsrepo/tree/bug/svn-update

Apologies for the code quality, I'm fairly new to ruby and found out
about insync? etc by digging through the package provider code.

Cheers
Mike

vcsrepo.diff

James Turnbull

unread,
Jul 21, 2010, 7:30:06 PM7/21/10
to puppe...@googlegroups.com

I think this causes an issue for at least the Git provider - now a bare
repo is constantly recreated - I haven't had time to dig into why but
I'm willing to bet its the change to insync? :)

Regards

James


--
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

Michael Knox

unread,
Jul 25, 2010, 8:02:30 AM7/25/10
to puppe...@googlegroups.com
I've updated the git provider to provide latest and latest?
Also tweaked the insync? method in the vcsrepo type so it uses the
previous behaviour for providers that don't have latest?.
The code is at:
http://github.com/mikeknox/puppet-vcsrepo/commit/66484cc7033d1b92b16c71df1d572cca7136d4a9

Tested with ensure => latest & ensure => present for both svn and git.
Also tested with revision => <some rev> when ensure => present.

Cheers

Reply all
Reply to author
Forward
0 new messages