Previously, we split affected into a "reverse relations with a
dependency on the migrated/change package" set and a set of "the
rest". With this commit we change the sets into a set of packages
with a direct relation on the migrated/changed package and the full
set of all affected.
The change has no effect on Britney's results as the first set is only
used as an optimization to reject some items faster.
Signed-off-by: Niels Thykier <niels@thykier.net>
At the moment, the two are identical, but they are not intended to
remain identical (i.e. the name should eventually become the full
suite name).
Signed-off-by: Niels Thykier <niels@thykier.net>
Cherry-Pick: 80bf9060de
Cherry-Pick: f32907acea
Cherry-Pick: 9ef496177f86b18d9f910da1360dd773b82f1fb7
Cherry-Pick: b16530a37d
Signed-off-by: Niels Thykier <niels@thykier.net>
Flatten the defaultdict(set) for unsat_deps into a standard dict for output
When determining whether a policy applies to a given item, use the
suite class rather than the suite name.
Signed-off-by: Niels Thykier <niels@thykier.net>
The "almost" comes from the fact that there is a reference to
"pu"/"stable" which does not have an obvious fix at the moment.
Signed-off-by: Niels Thykier <niels@thykier.net>
Previously, we would always create empty data structures for "pu" and
"tpu" if these optional suites were not configured. However, we only
reference "pu" and "tpu" directly in very few spots that can easily be
rewritten.
Signed-off-by: Niels Thykier <niels@thykier.net>
Into 3 categories:
* target suite ("testing")
* primary source suite ("unstable")
* additional source suites ("pu" and "tpu")
This will be useful for implementing logic working with suites without
basing it on the name of the suite.
Signed-off-by: Niels Thykier <niels@thykier.net>
At the moment, it is just a glorified dict. However, we will
eventually use it to get rid of the hardcoded references to "testing"
etc. all over the code.
Signed-off-by: Niels Thykier <niels@thykier.net>
All the output is a duplicate of what is being sent to the root logger
(albeit in a different format) and in e.g. our test suite the output
is entirely redundant.
Signed-off-by: Niels Thykier <niels@thykier.net>
With a bit of code we can replace the manual file-handling for
"upgrade_output" with a logger. This will enable us to refactor other
bits that currently depend on "output_write" by making those bits use
a logger instead.
This also migrates "do_hint" to use the new output logger. This is
due to "do_hint" being the only method relying on writing of partial
lines and maintaining support for that in "output_write" would have
been non-trivial.
To ensure "pretty" formatting to stdout, the messages in
"output_write" are now chopped into multiple lines.
The only visible change is that the output to stdout from
"output_write" now also includes the prefix with a timestamp.
However, then contents of "upgrade_output" remain unchanged
deliberately.
Signed-off-by: Niels Thykier <niels@thykier.net>
We already know the item is successful when we print it and the next
line ("final:") will confirm it any way.
Signed-off-by: Niels Thykier <niels@thykier.net>
At a glance, it looks like the value of "better" variable can be
decided from 3-4 places. However, due to the code flow only two of
those assignments are truly "live"/useful.
Signed-off-by: Niels Thykier <niels@thykier.net>