yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5

1,156 views
Skip to first unread message

Bryan Schneiders

unread,
Dec 4, 2009, 1:50:31 PM12/4/09
to Puppet Users
I'm using puppet-0.24.8-4.el5 on CentOS 5.4.

My problem is yumrepo isn't writing the "name=" field to the
repository files which causes yum to complain with the error:

Repository 'local-CentOS-5.4-x86_64' is missing name in configuration,
using id

I get this behavior on all of my yumrepo definitions. One of them
looks like this:

yumrepo {
"local-$lsbdistid-$release-$architecture":
name => "local-$lsbdistid-$release-$architecture",
baseurl => "http://hostname.changed.com:80/cobbler/ks_mirror/
$lsbdistid-$release-$architecture",
enabled => 1,
gpgcheck => 0,
priority => 10;
}

and the resulting file contents are:

[local-CentOS-5.4-x86_64]
baseurl=http://hostname.changed.com:80/cobbler/ks_mirror/CentOS-5.4-
x86_64
enabled=1
gpgcheck=0
priority=10

I can't find any mailing list discussions or bug reports on this. Can
anyone verify this behavior on other versions of puppet?

Avi Miller

unread,
Dec 4, 2009, 1:58:08 PM12/4/09
to puppet...@googlegroups.com
Hi,

Bryan Schneiders wrote:
> name => "local-$lsbdistid-$release-$architecture",

Try this instead:

name => "local-${lsbdistid}-${release}-${architecture}",

I use this method of referencing variables when sending out my local Yum
repositories, and it works for me.

cYa,
Avi

Bryan

unread,
Dec 4, 2009, 3:40:20 PM12/4/09
to Puppet Users
Never mind.

Apparently the answer is to use the "descr" option in yumrepo, not the
name option.

It would be nice if the documentation made any mention of this.

http://reductivelabs.com/trac/puppet/wiki/TypeReference#descr

Todd Zullinger

unread,
Dec 4, 2009, 4:08:40 PM12/4/09
to puppet...@googlegroups.com, puppe...@googlegroups.com
Bryan wrote:
> Apparently the answer is to use the "descr" option in yumrepo, not the
> name option.
>
> It would be nice if the documentation made any mention of this.
>
> http://reductivelabs.com/trac/puppet/wiki/TypeReference#descr

Perhaps like this?

--- >8 ---
From: Todd Zullinger <t...@pobox.com>
Date: Fri, 4 Dec 2009 16:04:33 -0500
Subject: [PATCH/puppet] yumrepo: Clarify the name and descr parameters

Most parameters are identical between the yumrepo type and the yum
configuration files. The name and descr parameters are exceptions worth
noting in the documentation.

Signed-off-by: Todd Zullinger <t...@pobox.com>
---
lib/puppet/type/yumrepo.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
index 39b9cd3..51ed17b 100644
--- a/lib/puppet/type/yumrepo.rb
+++ b/lib/puppet/type/yumrepo.rb
@@ -233,12 +233,14 @@ module Puppet
end

newparam(:name) do
- desc "The name of the repository."
+ desc "The name of the repository. This corresponds to the
+ repositoryid parameter in yum.conf(5)."
isnamevar
end

newproperty(:descr, :parent => Puppet::IniProperty) do
desc "A human readable description of the repository.
+ This corresponds to the name parameter in yum.conf(5).
#{ABSENT_DOC}"
newvalue(:absent) { self.should = :absent }
newvalue(/.*/) { }
--
1.6.6.rc1

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Does it follow that I reject all authority? Perish the thought. In the
matter of boots, I defer to the authority of the boot-maker.
-- Mikhail Bakunin

Daniel

unread,
May 20, 2015, 9:36:01 AM5/20/15
to puppet...@googlegroups.com, bryan.sc...@gmail.com
Yep, use descr => 'blah' instead of name => 'blah'
Reply all
Reply to author
Forward
0 new messages