Smart config file parsing

Anders F Björklund afb at algonet.se
Thu Jun 12 23:55:20 PDT 2008


Cliff Wells wrote:

>> You don't need variables.  Think about it:  when was the last time  
>> you
>> needed to alter those values ($releasever and $basearch) on an
>> existing system?
>
> I have to alter them every single time I install a system.  I copy the
> values from the YUM config and find/replace all the variables.  Not a
> huge task, but a task nonetheless.

I upgrade the "smart-config" virtual package, which has the channel
configuration for Smart - and gets generated with @VER@ and @ARCH at .
So the variables are used once, when generating the config package,
but then they stay the same - until configuration is updated again.

The configuration and mirrors work differently in Smart than in Yum,
but that fortunately doesn't mean one has to do everything manually...

> Because Smart and YUM use the same repositories, being able to use the
> same syntax to describe those repositories makes sense.

You can use the yumchannelsync plugin*, if you want it to pick up
changes made to the yum .repo files (similar to aptchannelsync) ?
It knows about the $releasever and $basearch variables too, and
which parts of the Yum repo configuration to skip over for Smart.

* just for reference it was at http://tracker.labix.org/issue350

>> The only real reason to use variables there is so that the config  
>> file
>> itself can pass between systems, which is really a case of
>> poor/improper management and/or lazy packaging.
>
> And also so you can do things like edit /etc/fedora-release and do an
> update/upgrade without needing to edit all the config files for
> smart/yum.

I upgrade fedora-release for that, and fedora-package-config-smart*
for upgrading the Smart configuration. Explicitly/non-magically...
Using packages for configuration isn't perfect (read: far from it),
but it works OK for default setup if hosts don't need customizing.

* https://admin.fedoraproject.org/pkgdb/packages/name/fedora-package- 
config-smart

--anders




More information about the Smart mailing list