18 Commits

Author SHA1 Message Date
Iain Lane
fe748849e0 suiteloader: Handle NBS
If we have this situation

  - Binary in target taken over by new source
  - Not cleaned up yet
  - New source updated in source suite

We can have *three* copies of a source package visible to britney at
once. Handle this case by recording the source package a pkgid was seen
in before, and trying to remove from that and the current source.
2020-11-20 17:37:44 +00:00
Iain Lane
67b9f56741 suiteloader: Don't need to do an 'in' check when adding to a set 2020-11-20 17:37:44 +00:00
Iain Lane
7ed335893e Implement Ubuntu component relationship constraints (ogre model) 2020-11-11 09:41:40 +00:00
Iain Lane
3fa9eceb89 Store the component in BinaryPackage and SourcePackage 2020-11-11 09:41:40 +00:00
Colin Watson
35c1bb36f4 Optionally merge packages from testing to unstable
To cope with a partial unstable suite like Ubuntu's -proposed pocket.
2020-10-20 14:57:51 +01:00
Ivo De Decker
64ba19cde4 Fix architecture check if Release file is used
When the architecture are read from the Release file, they are not
defined in the config file.

Adding 'all' as an architecture will not give the correct result. To
avoid confusion, explicitly check for this and error out if it is added.
2020-02-14 20:54:34 +00:00
Ivo De Decker
9056323165 Check that architecture config doesn't include "all"
Add 'all' as an architecture will not give the correct result. To avoid
confusion, explicitly check for this and error out if it is added.
2020-02-14 19:57:53 +00:00
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