Smart config file parsing

Michael Jennings mej at kainx.org
Thu Jun 12 19:35:17 PDT 2008


On Thursday, 12 June 2008, at 18:23:33 (-0700),
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.

First off, I specifically said "on an existing system."  Once the
config file is created, however that happens, those values do not
change.  (At least not until a major OS upgrade, which usually
involves re-pointing your package tool at a different set of
repositories anyway....)

Secondly, you're looking at this the wrong way.  Once the "variables"
are set properly by the entity packaging smart for use with your
systems/distribution (whether that entity is your distro or yourself),
they don't get modified.

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

Not really.  Smart supports several different types of repository, of
which the type yum supports is only one.  Thus, it is reasonable for
smart to need to use a different syntax to adequately describe the
various formats.

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

Nope.  $releasever is taken from the version field of the *package*
(i.e., `rpm -q --qf '%{VERSION}' fedora-release`), not from any file
on the system.

If you want to upgrade your Fedora install, you have to install a new
version of the "fedora-release" package.  How does that make more
sense than editing a config file or installing a different version of
your package tool?

> That's certainly a matter of opinion.  I don't think this feature is
> critical, but it's certainly been requested enough and would make a
> few things more convenient.

People seem to think it would, but it really wouldn't.  At least so
far no one has been able to present a valid use case.

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <mej at kainx.org>
Linux Server/Cluster Admin, LBL.gov       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "Fresh blood through tired skin.  New sweat to drown me in.
  Dress up this rotten carcass just to make it look alive."
                                            -- Nine Inch Nails, "last"



More information about the Smart mailing list