[Yum-devel] [dnf] new build: dnf-0.2.21-1.git050524e.fc18
Ales Kozumplik
akozumpl at redhat.com
Wed Feb 13 11:10:51 UTC 2013
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
More information about the Yum-devel
mailing list