11 Commits

Author SHA1 Message Date
Ivo De Decker
3c8b7ba11d Add source to SourcePackage object
Adding a source parameter to the SourcePackage allow finding the source
the object is referring to, so that parameter doesn't have to be passed
along separately.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2020-01-03 19:44:55 +00:00
Niels Thykier
a6e3581195
SuiteLoader: Support Release files only "Codename" fields
The spec for Release files says that (at least) one of "Suite" and
"Codename" will be defined.  This implies that "Suite" is optional
in some cases and SuiteLoader now correctly falls back to using
"Codename" in that case.

Closes: https://bugs.debian.org/942104
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-10-23 19:29:57 +00:00
Paul Gevers
85d10a27d2
Take suite name from Release file if it exist 2019-05-18 21:40:26 +02:00
Ivo De Decker
4fcb90b775
Read Built-Using info for binary packages
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 12:45:06 +00:00
Niels Thykier
f928c7ed3d Make SourcePackage.binaries a set
The recent code changes made use remove from the "binaries" field in
SourcePackages.  Lists are not particularly optimized for this kind
of removal and we have a few source packages with a lot of binary
packages (e.g. libreoffice, gcc-X-cross{,-ports}) that might trip
poor performance.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-14 13:19:05 +00:00
Niels Thykier
b16ae8046a
Add some '# pragma: no cover' for error cases, abstract methods, etc.
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 18:07:29 +00:00
Raphaël Hertzog
6c1cf01898 Do not ensure consistency of "Section" field across unstable and testing
In Debian, the same override is applied to both suites and they are
always consistent. It's not the case in Kali, we keep the value from
Debian when we import the package in britney's source distribution, but
if the same version is already present in the target distribution, it
keeps its original section (dating back to its initial import). In those
situations, the code will fail with an error like this one:

E: [2018-12-28T19:57:57+0000] - Mismatch found coinor-libdylp0 1.6.0-1.1 amd64 differs
I: [2018-12-28T19:57:57+0000] -  ... section libs != science
[...]
ValueError: Inconsistent / Unsupported data set

Commit 7efa865a04892b94a0ef18b2e611f210a6963925 which was supposed to
move code around introduced the check on this field. Prior to this, the
section was not checked. Since the section only has an impact on which
packages take part to the smooth updates feature, the impact of such a
mismatch is negligible so I simply dropped that check.
2018-12-28 21:30:48 +01:00
Niels Thykier
68fd0ba4b2
Remove --components/COMPONENTS as it is auto-detected
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 19:55:04 +00:00
Niels Thykier
0099c34d93
Refactor _read_binaries to reduce its complexity a bit
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 11:00:00 +00:00
Niels Thykier
f547fb20b1
suiteloader: Create a _setup_architecture method
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 10:59:59 +00:00
Niels Thykier
7efa865a04
Move Suite/Package loading into a separate class/module
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-15 21:58:37 +00:00