On 02/12/2013 06:34 PM, James Antill wrote:
Trying to be much shorter, the problem that two objects solves is that
you have API users which look like:
yb = YumBase()
yb.preconf.installroot = "/myinstallroot"
print yb.conf.whatever
...so you need a way to set a subset of the available configuration
before the "rest" of the configuration is loaded.
Ah, that's true. The DNF approach approach towards the API users is:
- if it's something that is essential for how the config loading
(logging, root override) happens, make sure to specify it before the
given action takes place
- read_conf_file() is what loads the configuration, it just puts the
loaded values directly into the conf object.
- if the api user doesn't like that read_conf_file() overrides some of
his previous configuration he can change it back later. This is
inconvenient, but very transparent
_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel