Issue #2247 has been updated by Matthew Byng-Maddick.

File enablerepo.patch added

And here's a slightly better patch, this time round we properly go through and 
do the yum package detection properly - this means we can do "`ensure => 
latest`" as you might expect.

It's a bit complicated, in that you have to change the yumhelper (notably the 
non-yum-library fallback in the yumhelper appears not to work for me due to an 
AttributeException some time during trying to parse the yum response, but the 
execution of the yum binary does seem to be correct). The other thing is that 
for each package object, we have to work out which enablerepo(-set?) we asked 
yum about for the updates.

I haven't done the disablerepo side, but it wouldn't be too hard to do along 
the same lines as enable repo (and the patches to yumhelper **do** support 
disablerepo). Also my ruby isn't great, so I suspect my code-style is a bit 
ugly, and I'm going to miss language idioms. It does, however, seem to work.

Cheers

MBM
----------------------------------------
Feature #2247: enablerepo and disablerepo for yum type
https://projects.puppetlabs.com/issues/2247

Author: Ben -
Status: Accepted
Priority: Normal
Assignee: 
Category: package
Target version: Statler
Affected Puppet version: 0.24.8
Keywords: yum
Branch: 


it would be nice to be able to enable a disabled repo for the installation on 
one package.

for example installing facter from EPEL.

something like;

<pre>
package { "facter": ensure => installed, enablerepo => [ "epel", "epel-testing" 
]; }
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to