libdnf icon indicating copy to clipboard operation
libdnf copied to clipboard

dnf-context: Do not modify global configuration when setting options

Open jan-kolarik opened this issue 1 year ago • 1 comments

During the work on the https://github.com/rpm-software-management/libdnf/pull/1635, I discovered several places where option setters in dnf-context are modifying the global configuration and therefore affect other context instances:

dnf_context_set_best();
dnf_context_set_install_weak_deps();
dnf_context_set_allow_vendor_change();
dnf_context_set_keep_cache();
dnf_context_set_zchunk();
dnf_context_set_plugins_all_disabled();

Maybe there are other places, I didn't investigate deeply.

jan-kolarik avatar Jan 16 '24 11:01 jan-kolarik

It seems it might be on purpose looking at the https://github.com/rpm-software-management/libdnf/pull/998.

jan-kolarik avatar Jan 16 '24 13:01 jan-kolarik