When running dnf-automatic in RHEL 10.0 where releasever_minor should
default to "0", releasever_minor variable was incorrectly detected as
undefined. That led to expanding a metalink for an EPEL repository to
a wrong URL.
The cause was a bad logic in updating the release, releasever_major,
and releasever_minor triplet in dnf.cli.cli.Cli._read_conf_file():
Setting release invalidates releasever_major and releasever_minor. At
the same time for backward compatibilty detected release only contains
the major number.
This bug did not manifest in "dnf upgrade" command because "dnf"
program does not explicitly construct dnf.Base() before calling
_read_conf_file(). That is dnf-automtic first detected releasever=10
and releasever_minor=0 when calling _setup_default_conf() via
dnf.Base(). But then _read_conf_file() called by dnf-automatic set
releasever again to 10, that rewrote releasever_minor to None and
then _read_conf_file() set releasever_minor to releasever_minor, i.e
to None.
This patch does not change the code flow to minimize regressions.
Instead it saves the original releasever_minor value to be able to
default to it again.
Resolve: #2259
= DNF Testing Framework =
What will not be tested:
* all combinations of query parameters (tested in hawkey)
* rpm transactions themselves (tested in RPM)
* depsolving (the core depsolving algorithms are tested in libsolv, correctly
setting up libsolv is hawkey's job)
== The repos/ directory ==
This directory contains sample package data for testing. The goal is to have as
few packages as possible, ideally one or two per a specific testing role they
can play.