On Jan 11, 4:02 am, Arnau Bria <[email protected]> wrote:
> Hi all,
>
> I'm facing the bug 5231 when running puppet: host has some repos with
> many section main defined:
>
> # grep main *
> atrpms.repo:[main]
> cern-extra.repo:[main]
> cern-extra-srpms.repo:[main]
> cern-only.repo:[main]
> cern-only-srpms.repo:[main]
> cern.repo:[main]
> cern-srpms.repo:[main]
> cern-test.repo:[main]
> cern-test-srpms.repo:[main]
> cern-update.repo:[main]
> cern-update-srpms.repo:[main]
> dag.repo:[main]
> rhaps2.repo:[main]
> rhaps2-srpms.repo:[main]
>
> and puppet complains about it when adding a repo with no main section:
>
> # cat puppet-local-repo.repo
> [puppet-local-repo]
> name=puppet-local-repo
>
> I see no solution on puppet-bug and the only way I found to by-pass it
> is moving yum.repos.d direcotry.
>
> anyone who already faced it could give me a workaround?

Bug 5231 is about the lack of clarity and specificity in error
messages about conflicts between yum repos, not about the fact that an
error was raised in the first place.  It sounds like you are expecting
Puppet to successfully apply your manifest.  If indeed it should do
so, then you should file a separate ticket.

However, it's not clearcut to me that Puppet should do that.  Do
versions of yum more recent than 3.2.22 in fact allow [main] sections
to appear in .repo files?  Version 3.2.22 does not.  From the man page
for yum.conf(5): "There should be only one [main] section. [...] The
[main] section must exist" (perforce in yum.conf) "for yum to do
anything."  If the yum configuration on your system is faulty then I
think it reasonable for Puppet to raise an error in response.

I assume that yum itself is not complaining, so perhaps it is silently
ignoring the [main] sections in your .repo files.  If that's the case
then the best workaround is probably to just remove those sections.
Alternatively, if yum is in fact using all those [main] sections then
you may be able to work around the problem by, for example, merging
all the [main] sections together into yum.conf (if that's indeed
equivalent to what yum does with them).


Cheers,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to