[CentOS] Scriptable way to edit yum .repo files?

Thu Jan 8 00:11:53 UTC 2009
Amos Shapira <amos.shapira at gmail.com>

Hello,

Is there a standard programmatic way to manipulate yum configuration
files, particularly the .repo files?

I want to add things like "priority=..." per repo, or
"check_obsoletes=1" to the priorities plugin config.

I can cook specific search/append using perl or sed but was wondering
whether there is a more elegant way.

I found Perl's Conf::INI module but it expects comments beginning with
";", not "#".

Thanks,

--Amos