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

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


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 "#".



More information about the CentOS mailing list